<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.5"/>
<title>QCNSim: ExponentialTrafficGenerator Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">QCNSim
   </div>
   <div id="projectbrief">Simulator for Quake-Catcher Network</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.5 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Friends</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Macros</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Pages</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pri-methods">Private Member Functions</a> &#124;
<a href="#pri-attribs">Private Attributes</a> &#124;
<a href="class_exponential_traffic_generator-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">ExponentialTrafficGenerator Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p><a class="el" href="class_exponential_traffic_generator.html" title="ExponentialTrafficGenerator class. ">ExponentialTrafficGenerator</a> class.  
 <a href="class_exponential_traffic_generator.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="_exponential_traffic_generator_8h_source.html">ExponentialTrafficGenerator.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for ExponentialTrafficGenerator:</div>
<div class="dyncontent">
 <div class="center">
  <img src="class_exponential_traffic_generator.png" usemap="#ExponentialTrafficGenerator_map" alt=""/>
  <map id="ExponentialTrafficGenerator_map" name="ExponentialTrafficGenerator_map">
<area href="class_traffic_generator.html" title="TrafficGenerator parent class. " alt="TrafficGenerator" shape="rect" coords="0,56,171,80"/>
<area href="class_entity.html" title="Entity class. " alt="Entity" shape="rect" coords="0,0,171,24"/>
</map>
 </div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a2309416e72a708196f84f8f8ef80b714"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_exponential_traffic_generator.html#a2309416e72a708196f84f8f8ef80b714">ExponentialTrafficGenerator</a> (<a class="el" href="class_simulator_globals.html">SimulatorGlobals</a> &amp;<a class="el" href="class_traffic_generator.html#a42261ccf207f61a401473a106bc0bae3">simulatorGlobals</a>, <a class="el" href="class_scheduler.html">Scheduler</a> &amp;<a class="el" href="class_traffic_generator.html#a9569cd494b926b84f384c7380349d51a">scheduler</a>, <a class="el" href="_event_type_8h.html#a2628ea8d12e8b2563c32f05dc7fff6fa">EventType</a> <a class="el" href="class_traffic_generator.html#a84eef27cdbfa66bbf8c14e0128196a62">eventType</a>, std::shared_ptr&lt; <a class="el" href="class_entity.html">Entity</a> &gt; <a class="el" href="class_traffic_generator.html#acb5d8009cf49ff99a6fee75ec456e166">tokenContents</a>, std::shared_ptr&lt; <a class="el" href="class_entity.html">Entity</a> &gt; <a class="el" href="class_traffic_generator.html#a4f69b85034831c2c40e789b0c0e11511">source</a>, std::shared_ptr&lt; <a class="el" href="class_entity.html">Entity</a> &gt; <a class="el" href="class_traffic_generator.html#a6ba09ea9c5df93de64af75886df0b11b">destination</a>, int <a class="el" href="class_traffic_generator.html#a2158c9e714171e5a04032571021b23c4">priority</a>, double <a class="el" href="class_exponential_traffic_generator.html#ac4d67b1f01cd5d96e83e2b7c6d4ad841">tau</a>)</td></tr>
<tr class="separator:a2309416e72a708196f84f8f8ef80b714"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a370588812391121414e82498e9d4d61f"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_exponential_traffic_generator.html#a370588812391121414e82498e9d4d61f">ExponentialTrafficGenerator</a> (<a class="el" href="class_simulator_globals.html">SimulatorGlobals</a> &amp;<a class="el" href="class_traffic_generator.html#a42261ccf207f61a401473a106bc0bae3">simulatorGlobals</a>, <a class="el" href="class_scheduler.html">Scheduler</a> &amp;<a class="el" href="class_traffic_generator.html#a9569cd494b926b84f384c7380349d51a">scheduler</a>, <a class="el" href="_event_type_8h.html#a2628ea8d12e8b2563c32f05dc7fff6fa">EventType</a> <a class="el" href="class_traffic_generator.html#a84eef27cdbfa66bbf8c14e0128196a62">eventType</a>, std::shared_ptr&lt; <a class="el" href="class_entity.html">Entity</a> &gt; <a class="el" href="class_traffic_generator.html#acb5d8009cf49ff99a6fee75ec456e166">tokenContents</a>, std::shared_ptr&lt; <a class="el" href="class_entity.html">Entity</a> &gt; <a class="el" href="class_traffic_generator.html#a4f69b85034831c2c40e789b0c0e11511">source</a>, std::shared_ptr&lt; <a class="el" href="class_entity.html">Entity</a> &gt; <a class="el" href="class_traffic_generator.html#a6ba09ea9c5df93de64af75886df0b11b">destination</a>, int <a class="el" href="class_traffic_generator.html#a2158c9e714171e5a04032571021b23c4">priority</a>, double <a class="el" href="class_exponential_traffic_generator.html#ac4d67b1f01cd5d96e83e2b7c6d4ad841">tau</a>, unsigned int seed)</td></tr>
<tr class="separator:a370588812391121414e82498e9d4d61f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9095b69f4e9eee6c4027ab9672916157"><td class="memItemLeft" align="right" valign="top">std::shared_ptr&lt; <a class="el" href="class_token.html">Token</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_exponential_traffic_generator.html#a9095b69f4e9eee6c4027ab9672916157">createInstanceTrafficEvent</a> (bool recordRoute=false) override</td></tr>
<tr class="separator:a9095b69f4e9eee6c4027ab9672916157"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af8bddbc12219130dad0908a2a2df76b4"><td class="memItemLeft" align="right" valign="top">std::shared_ptr&lt; <a class="el" href="class_token.html">Token</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_exponential_traffic_generator.html#af8bddbc12219130dad0908a2a2df76b4">createInstanceTrafficEvent</a> (std::shared_ptr&lt; <a class="el" href="class_entity.html">Entity</a> &gt; <a class="el" href="class_traffic_generator.html#acb5d8009cf49ff99a6fee75ec456e166">tokenContents</a>, bool recordRoute=false) override</td></tr>
<tr class="separator:af8bddbc12219130dad0908a2a2df76b4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af7e29232e74258ac42c5d82f4200ee25"><td class="memItemLeft" align="right" valign="top">std::shared_ptr&lt; <a class="el" href="class_token.html">Token</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_exponential_traffic_generator.html#af7e29232e74258ac42c5d82f4200ee25">createInstanceTrafficEvent</a> (std::vector&lt; std::shared_ptr&lt; <a class="el" href="class_entity.html">Entity</a> &gt;&gt; explicitRoute, bool recordRoute=false) override</td></tr>
<tr class="separator:af7e29232e74258ac42c5d82f4200ee25"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acfc98aa272007bf6f46639aba122e12a"><td class="memItemLeft" align="right" valign="top">std::shared_ptr&lt; <a class="el" href="class_token.html">Token</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_exponential_traffic_generator.html#acfc98aa272007bf6f46639aba122e12a">createInstanceTrafficEvent</a> (std::shared_ptr&lt; <a class="el" href="class_entity.html">Entity</a> &gt; <a class="el" href="class_traffic_generator.html#acb5d8009cf49ff99a6fee75ec456e166">tokenContents</a>, std::vector&lt; std::shared_ptr&lt; <a class="el" href="class_entity.html">Entity</a> &gt;&gt; explicitRoute, bool recordRoute=false) override</td></tr>
<tr class="separator:acfc98aa272007bf6f46639aba122e12a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a917831a1c62644aa1b04beaa401b691d"><td class="memItemLeft" align="right" valign="top">std::shared_ptr&lt; <a class="el" href="class_protocol_data_unit.html">ProtocolDataUnit</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_exponential_traffic_generator.html#a917831a1c62644aa1b04beaa401b691d">createInstanceTrafficEventPdu</a> (unsigned int pduSize, bool recordRoute=false) override</td></tr>
<tr class="memdesc:a917831a1c62644aa1b04beaa401b691d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates an instance of exponential traffic event with PDU.  <a href="#a917831a1c62644aa1b04beaa401b691d">More...</a><br/></td></tr>
<tr class="separator:a917831a1c62644aa1b04beaa401b691d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad15ce961a2b52786b83ecea370a4ea7c"><td class="memItemLeft" align="right" valign="top">std::shared_ptr&lt; <a class="el" href="class_protocol_data_unit.html">ProtocolDataUnit</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_exponential_traffic_generator.html#ad15ce961a2b52786b83ecea370a4ea7c">createInstanceTrafficEventPdu</a> (unsigned int pduSize, std::shared_ptr&lt; <a class="el" href="class_entity.html">Entity</a> &gt; <a class="el" href="class_traffic_generator.html#acb5d8009cf49ff99a6fee75ec456e166">tokenContents</a>, bool recordRoute=false) override</td></tr>
<tr class="memdesc:ad15ce961a2b52786b83ecea370a4ea7c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates an instance of exponential traffic event.  <a href="#ad15ce961a2b52786b83ecea370a4ea7c">More...</a><br/></td></tr>
<tr class="separator:ad15ce961a2b52786b83ecea370a4ea7c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a24d3daad5db81b0242a2be43b9158f4d"><td class="memItemLeft" align="right" valign="top">std::shared_ptr&lt; <a class="el" href="class_protocol_data_unit.html">ProtocolDataUnit</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_exponential_traffic_generator.html#a24d3daad5db81b0242a2be43b9158f4d">createInstanceTrafficEventPdu</a> (unsigned int pduSize, std::vector&lt; std::shared_ptr&lt; <a class="el" href="class_entity.html">Entity</a> &gt;&gt; explicitRoute, bool recordRoute=false) override</td></tr>
<tr class="memdesc:a24d3daad5db81b0242a2be43b9158f4d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates an instance of exponential traffic event.  <a href="#a24d3daad5db81b0242a2be43b9158f4d">More...</a><br/></td></tr>
<tr class="separator:a24d3daad5db81b0242a2be43b9158f4d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8fd1c69c9243af8bf41df11c7475fb20"><td class="memItemLeft" align="right" valign="top">std::shared_ptr&lt; <a class="el" href="class_protocol_data_unit.html">ProtocolDataUnit</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_exponential_traffic_generator.html#a8fd1c69c9243af8bf41df11c7475fb20">createInstanceTrafficEventPdu</a> (unsigned int pduSize, std::shared_ptr&lt; <a class="el" href="class_entity.html">Entity</a> &gt; <a class="el" href="class_traffic_generator.html#acb5d8009cf49ff99a6fee75ec456e166">tokenContents</a>, std::vector&lt; std::shared_ptr&lt; <a class="el" href="class_entity.html">Entity</a> &gt;&gt; explicitRoute, bool recordRoute=false) override</td></tr>
<tr class="memdesc:a8fd1c69c9243af8bf41df11c7475fb20"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates an instance of exponential traffic event.  <a href="#a8fd1c69c9243af8bf41df11c7475fb20">More...</a><br/></td></tr>
<tr class="separator:a8fd1c69c9243af8bf41df11c7475fb20"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab3e55f82f8d2539ca6adaa190177d313"><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_exponential_traffic_generator.html#ab3e55f82f8d2539ca6adaa190177d313">getTau</a> () const </td></tr>
<tr class="separator:ab3e55f82f8d2539ca6adaa190177d313"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_class_traffic_generator"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_class_traffic_generator')"><img src="closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="class_traffic_generator.html">TrafficGenerator</a></td></tr>
<tr class="memitem:aad024e020fac17dbee74f0da16707df1 inherit pub_methods_class_traffic_generator"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_traffic_generator.html#aad024e020fac17dbee74f0da16707df1">turnOn</a> ()</td></tr>
<tr class="separator:aad024e020fac17dbee74f0da16707df1 inherit pub_methods_class_traffic_generator"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af1aeb5d90d269a1d1ac5316522b5233e inherit pub_methods_class_traffic_generator"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_traffic_generator.html#af1aeb5d90d269a1d1ac5316522b5233e">turnOff</a> ()</td></tr>
<tr class="separator:af1aeb5d90d269a1d1ac5316522b5233e inherit pub_methods_class_traffic_generator"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac8c16ee901079f8279fafd7411098cbd inherit pub_methods_class_traffic_generator"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_traffic_generator.html#ac8c16ee901079f8279fafd7411098cbd">setTokenContents</a> (std::shared_ptr&lt; <a class="el" href="class_entity.html">Entity</a> &gt; <a class="el" href="class_traffic_generator.html#acb5d8009cf49ff99a6fee75ec456e166">tokenContents</a>)</td></tr>
<tr class="separator:ac8c16ee901079f8279fafd7411098cbd inherit pub_methods_class_traffic_generator"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab9b21f5739748fadede79c7e4fa35ed7 inherit pub_methods_class_traffic_generator"><td class="memItemLeft" align="right" valign="top">virtual unsigned int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_traffic_generator.html#ab9b21f5739748fadede79c7e4fa35ed7">getTokensGeneratedCount</a> () const </td></tr>
<tr class="separator:ab9b21f5739748fadede79c7e4fa35ed7 inherit pub_methods_class_traffic_generator"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac97d2e786e7c91117fbf590988eefd04 inherit pub_methods_class_traffic_generator"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="_event_type_8h.html#a2628ea8d12e8b2563c32f05dc7fff6fa">EventType</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_traffic_generator.html#ac97d2e786e7c91117fbf590988eefd04">getEventType</a> () const </td></tr>
<tr class="separator:ac97d2e786e7c91117fbf590988eefd04 inherit pub_methods_class_traffic_generator"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa9c53b70da6a733cb0723282b291b25f inherit pub_methods_class_traffic_generator"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_traffic_generator.html#aa9c53b70da6a733cb0723282b291b25f">setEventType</a> (<a class="el" href="_event_type_8h.html#a2628ea8d12e8b2563c32f05dc7fff6fa">EventType</a> <a class="el" href="class_traffic_generator.html#a84eef27cdbfa66bbf8c14e0128196a62">eventType</a>)</td></tr>
<tr class="separator:aa9c53b70da6a733cb0723282b291b25f inherit pub_methods_class_traffic_generator"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3f71664ca8b268773234c1538539bebf inherit pub_methods_class_traffic_generator"><td class="memItemLeft" align="right" valign="top">virtual std::shared_ptr&lt; <a class="el" href="class_entity.html">Entity</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_traffic_generator.html#a3f71664ca8b268773234c1538539bebf">getTokenContents</a> () const </td></tr>
<tr class="separator:a3f71664ca8b268773234c1538539bebf inherit pub_methods_class_traffic_generator"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2247f62c33cf0875f423b58403af7042 inherit pub_methods_class_traffic_generator"><td class="memItemLeft" align="right" valign="top">virtual std::shared_ptr&lt; <a class="el" href="class_entity.html">Entity</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_traffic_generator.html#a2247f62c33cf0875f423b58403af7042">getSource</a> () const </td></tr>
<tr class="separator:a2247f62c33cf0875f423b58403af7042 inherit pub_methods_class_traffic_generator"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad5c0ccdbf176c8aadd4b1bc7771ea326 inherit pub_methods_class_traffic_generator"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_traffic_generator.html#ad5c0ccdbf176c8aadd4b1bc7771ea326">setSource</a> (std::shared_ptr&lt; <a class="el" href="class_entity.html">Entity</a> &gt; <a class="el" href="class_traffic_generator.html#a4f69b85034831c2c40e789b0c0e11511">source</a>)</td></tr>
<tr class="separator:ad5c0ccdbf176c8aadd4b1bc7771ea326 inherit pub_methods_class_traffic_generator"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abb89d1eefa73ddf5ea95167bd9245b48 inherit pub_methods_class_traffic_generator"><td class="memItemLeft" align="right" valign="top">virtual std::shared_ptr&lt; <a class="el" href="class_entity.html">Entity</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_traffic_generator.html#abb89d1eefa73ddf5ea95167bd9245b48">getDestination</a> () const </td></tr>
<tr class="separator:abb89d1eefa73ddf5ea95167bd9245b48 inherit pub_methods_class_traffic_generator"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9984034478b838d1f09d275e297f3309 inherit pub_methods_class_traffic_generator"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_traffic_generator.html#a9984034478b838d1f09d275e297f3309">setDestination</a> (std::shared_ptr&lt; <a class="el" href="class_entity.html">Entity</a> &gt; <a class="el" href="class_traffic_generator.html#a6ba09ea9c5df93de64af75886df0b11b">destination</a>)</td></tr>
<tr class="separator:a9984034478b838d1f09d275e297f3309 inherit pub_methods_class_traffic_generator"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_class_entity"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_class_entity')"><img src="closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="class_entity.html">Entity</a></td></tr>
<tr class="memitem:ac2da1e8a32161accc56f39ac52cebd86 inherit pub_methods_class_entity"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_entity.html#ac2da1e8a32161accc56f39ac52cebd86">~Entity</a> ()=0</td></tr>
<tr class="memdesc:ac2da1e8a32161accc56f39ac52cebd86 inherit pub_methods_class_entity"><td class="mdescLeft">&#160;</td><td class="mdescRight">Make this abstract (pure virtual), cannot be instantiated.  <a href="#ac2da1e8a32161accc56f39ac52cebd86">More...</a><br/></td></tr>
<tr class="separator:ac2da1e8a32161accc56f39ac52cebd86 inherit pub_methods_class_entity"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pri-methods"></a>
Private Member Functions</h2></td></tr>
<tr class="memitem:a6d33c94dd3918359ee75d51bb002e670"><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_exponential_traffic_generator.html#a6d33c94dd3918359ee75d51bb002e670">generateExponentialVariate</a> ()</td></tr>
<tr class="separator:a6d33c94dd3918359ee75d51bb002e670"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pri-attribs"></a>
Private Attributes</h2></td></tr>
<tr class="memitem:ac4d67b1f01cd5d96e83e2b7c6d4ad841"><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_exponential_traffic_generator.html#ac4d67b1f01cd5d96e83e2b7c6d4ad841">tau</a></td></tr>
<tr class="memdesc:ac4d67b1f01cd5d96e83e2b7c6d4ad841"><td class="mdescLeft">&#160;</td><td class="mdescRight">Mean interarrival time for exponential probability distribution.  <a href="#ac4d67b1f01cd5d96e83e2b7c6d4ad841">More...</a><br/></td></tr>
<tr class="separator:ac4d67b1f01cd5d96e83e2b7c6d4ad841"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="inherited"></a>
Additional Inherited Members</h2></td></tr>
<tr class="inherit_header pro_methods_class_traffic_generator"><td colspan="2" onclick="javascript:toggleInherit('pro_methods_class_traffic_generator')"><img src="closed.png" alt="-"/>&#160;Protected Member Functions inherited from <a class="el" href="class_traffic_generator.html">TrafficGenerator</a></td></tr>
<tr class="memitem:a6fcdb1ce1b3fb4f35c021ea8b99f6cf5 inherit pro_methods_class_traffic_generator"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_traffic_generator.html#a6fcdb1ce1b3fb4f35c021ea8b99f6cf5">TrafficGenerator</a> (<a class="el" href="class_simulator_globals.html">SimulatorGlobals</a> &amp;<a class="el" href="class_traffic_generator.html#a42261ccf207f61a401473a106bc0bae3">simulatorGlobals</a>, <a class="el" href="class_scheduler.html">Scheduler</a> &amp;<a class="el" href="class_traffic_generator.html#a9569cd494b926b84f384c7380349d51a">scheduler</a>, <a class="el" href="_event_type_8h.html#a2628ea8d12e8b2563c32f05dc7fff6fa">EventType</a> <a class="el" href="class_traffic_generator.html#a84eef27cdbfa66bbf8c14e0128196a62">eventType</a>, std::shared_ptr&lt; <a class="el" href="class_entity.html">Entity</a> &gt; <a class="el" href="class_traffic_generator.html#acb5d8009cf49ff99a6fee75ec456e166">tokenContents</a>, std::shared_ptr&lt; <a class="el" href="class_entity.html">Entity</a> &gt; <a class="el" href="class_traffic_generator.html#a4f69b85034831c2c40e789b0c0e11511">source</a>, std::shared_ptr&lt; <a class="el" href="class_entity.html">Entity</a> &gt; <a class="el" href="class_traffic_generator.html#a6ba09ea9c5df93de64af75886df0b11b">destination</a>, int <a class="el" href="class_traffic_generator.html#a2158c9e714171e5a04032571021b23c4">priority</a>)</td></tr>
<tr class="separator:a6fcdb1ce1b3fb4f35c021ea8b99f6cf5 inherit pro_methods_class_traffic_generator"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa805566ed505ad0f90982610bcf3869a inherit pro_methods_class_traffic_generator"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_traffic_generator.html#aa805566ed505ad0f90982610bcf3869a">TrafficGenerator</a> (<a class="el" href="class_simulator_globals.html">SimulatorGlobals</a> &amp;<a class="el" href="class_traffic_generator.html#a42261ccf207f61a401473a106bc0bae3">simulatorGlobals</a>, <a class="el" href="class_scheduler.html">Scheduler</a> &amp;<a class="el" href="class_traffic_generator.html#a9569cd494b926b84f384c7380349d51a">scheduler</a>, <a class="el" href="_event_type_8h.html#a2628ea8d12e8b2563c32f05dc7fff6fa">EventType</a> <a class="el" href="class_traffic_generator.html#a84eef27cdbfa66bbf8c14e0128196a62">eventType</a>, std::shared_ptr&lt; <a class="el" href="class_entity.html">Entity</a> &gt; <a class="el" href="class_traffic_generator.html#acb5d8009cf49ff99a6fee75ec456e166">tokenContents</a>, std::shared_ptr&lt; <a class="el" href="class_entity.html">Entity</a> &gt; <a class="el" href="class_traffic_generator.html#a4f69b85034831c2c40e789b0c0e11511">source</a>, std::shared_ptr&lt; <a class="el" href="class_entity.html">Entity</a> &gt; <a class="el" href="class_traffic_generator.html#a6ba09ea9c5df93de64af75886df0b11b">destination</a>, int <a class="el" href="class_traffic_generator.html#a2158c9e714171e5a04032571021b23c4">priority</a>, unsigned int seed)</td></tr>
<tr class="separator:aa805566ed505ad0f90982610bcf3869a inherit pro_methods_class_traffic_generator"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pro_attribs_class_traffic_generator"><td colspan="2" onclick="javascript:toggleInherit('pro_attribs_class_traffic_generator')"><img src="closed.png" alt="-"/>&#160;Protected Attributes inherited from <a class="el" href="class_traffic_generator.html">TrafficGenerator</a></td></tr>
<tr class="memitem:a9569cd494b926b84f384c7380349d51a inherit pro_attribs_class_traffic_generator"><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_scheduler.html">Scheduler</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_traffic_generator.html#a9569cd494b926b84f384c7380349d51a">scheduler</a></td></tr>
<tr class="memdesc:a9569cd494b926b84f384c7380349d51a inherit pro_attribs_class_traffic_generator"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reference to <a class="el" href="class_scheduler.html" title="Scheduler class. ">Scheduler</a> object, such that traffic generators may schedule their events.  <a href="#a9569cd494b926b84f384c7380349d51a">More...</a><br/></td></tr>
<tr class="separator:a9569cd494b926b84f384c7380349d51a inherit pro_attribs_class_traffic_generator"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a42261ccf207f61a401473a106bc0bae3 inherit pro_attribs_class_traffic_generator"><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_simulator_globals.html">SimulatorGlobals</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_traffic_generator.html#a42261ccf207f61a401473a106bc0bae3">simulatorGlobals</a></td></tr>
<tr class="memdesc:a42261ccf207f61a401473a106bc0bae3 inherit pro_attribs_class_traffic_generator"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reference to <a class="el" href="class_simulator_globals.html" title="Simulator-scope variables and parameters. ">SimulatorGlobals</a> object, to get random generator info.  <a href="#a42261ccf207f61a401473a106bc0bae3">More...</a><br/></td></tr>
<tr class="separator:a42261ccf207f61a401473a106bc0bae3 inherit pro_attribs_class_traffic_generator"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a84eef27cdbfa66bbf8c14e0128196a62 inherit pro_attribs_class_traffic_generator"><td class="memItemLeft" align="right" valign="top"><a class="el" href="_event_type_8h.html#a2628ea8d12e8b2563c32f05dc7fff6fa">EventType</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_traffic_generator.html#a84eef27cdbfa66bbf8c14e0128196a62">eventType</a></td></tr>
<tr class="memdesc:a84eef27cdbfa66bbf8c14e0128196a62 inherit pro_attribs_class_traffic_generator"><td class="mdescLeft">&#160;</td><td class="mdescRight"><a class="el" href="class_event.html" title="Event class. ">Event</a> type that this generator will produce.  <a href="#a84eef27cdbfa66bbf8c14e0128196a62">More...</a><br/></td></tr>
<tr class="separator:a84eef27cdbfa66bbf8c14e0128196a62 inherit pro_attribs_class_traffic_generator"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acb5d8009cf49ff99a6fee75ec456e166 inherit pro_attribs_class_traffic_generator"><td class="memItemLeft" align="right" valign="top">std::shared_ptr&lt; <a class="el" href="class_entity.html">Entity</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_traffic_generator.html#acb5d8009cf49ff99a6fee75ec456e166">tokenContents</a></td></tr>
<tr class="memdesc:acb5d8009cf49ff99a6fee75ec456e166 inherit pro_attribs_class_traffic_generator"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reference to <a class="el" href="class_entity.html" title="Entity class. ">Entity</a> object that will be carried by the token.  <a href="#acb5d8009cf49ff99a6fee75ec456e166">More...</a><br/></td></tr>
<tr class="separator:acb5d8009cf49ff99a6fee75ec456e166 inherit pro_attribs_class_traffic_generator"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4f69b85034831c2c40e789b0c0e11511 inherit pro_attribs_class_traffic_generator"><td class="memItemLeft" align="right" valign="top">std::shared_ptr&lt; <a class="el" href="class_entity.html">Entity</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_traffic_generator.html#a4f69b85034831c2c40e789b0c0e11511">source</a></td></tr>
<tr class="memdesc:a4f69b85034831c2c40e789b0c0e11511 inherit pro_attribs_class_traffic_generator"><td class="mdescLeft">&#160;</td><td class="mdescRight"><a class="el" href="class_entity.html" title="Entity class. ">Entity</a> to which the generator is attached (to which tokens are generated).  <a href="#a4f69b85034831c2c40e789b0c0e11511">More...</a><br/></td></tr>
<tr class="separator:a4f69b85034831c2c40e789b0c0e11511 inherit pro_attribs_class_traffic_generator"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6ba09ea9c5df93de64af75886df0b11b inherit pro_attribs_class_traffic_generator"><td class="memItemLeft" align="right" valign="top">std::shared_ptr&lt; <a class="el" href="class_entity.html">Entity</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_traffic_generator.html#a6ba09ea9c5df93de64af75886df0b11b">destination</a></td></tr>
<tr class="memdesc:a6ba09ea9c5df93de64af75886df0b11b inherit pro_attribs_class_traffic_generator"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destination entity, to which the generated tokens will be sent.  <a href="#a6ba09ea9c5df93de64af75886df0b11b">More...</a><br/></td></tr>
<tr class="separator:a6ba09ea9c5df93de64af75886df0b11b inherit pro_attribs_class_traffic_generator"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2158c9e714171e5a04032571021b23c4 inherit pro_attribs_class_traffic_generator"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_traffic_generator.html#a2158c9e714171e5a04032571021b23c4">priority</a></td></tr>
<tr class="memdesc:a2158c9e714171e5a04032571021b23c4 inherit pro_attribs_class_traffic_generator"><td class="mdescLeft">&#160;</td><td class="mdescRight"><a class="el" href="class_token.html" title="Token class. ">Token</a> priority. Higher priority, higher number.  <a href="#a2158c9e714171e5a04032571021b23c4">More...</a><br/></td></tr>
<tr class="separator:a2158c9e714171e5a04032571021b23c4 inherit pro_attribs_class_traffic_generator"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aaa73cfc4e885ecfeecbe894efd232493 inherit pro_attribs_class_traffic_generator"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_traffic_generator.html#aaa73cfc4e885ecfeecbe894efd232493">isOn</a></td></tr>
<tr class="memdesc:aaa73cfc4e885ecfeecbe894efd232493 inherit pro_attribs_class_traffic_generator"><td class="mdescLeft">&#160;</td><td class="mdescRight">True if generator is on (and generating traffic); false if generator is off.  <a href="#aaa73cfc4e885ecfeecbe894efd232493">More...</a><br/></td></tr>
<tr class="separator:aaa73cfc4e885ecfeecbe894efd232493 inherit pro_attribs_class_traffic_generator"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a29c9cdcb113742700e3f7fcbcb7ee325 inherit pro_attribs_class_traffic_generator"><td class="memItemLeft" align="right" valign="top">unsigned int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_traffic_generator.html#a29c9cdcb113742700e3f7fcbcb7ee325">tokensGeneratedCount</a></td></tr>
<tr class="memdesc:a29c9cdcb113742700e3f7fcbcb7ee325 inherit pro_attribs_class_traffic_generator"><td class="mdescLeft">&#160;</td><td class="mdescRight">Count of tokens (events) generated by this traffic generator.  <a href="#a29c9cdcb113742700e3f7fcbcb7ee325">More...</a><br/></td></tr>
<tr class="separator:a29c9cdcb113742700e3f7fcbcb7ee325 inherit pro_attribs_class_traffic_generator"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p><a class="el" href="class_exponential_traffic_generator.html" title="ExponentialTrafficGenerator class. ">ExponentialTrafficGenerator</a> class. </p>
<dl class="section author"><dt>Author</dt><dd>Marcos Portnoi </dd></dl>
<dl class="section date"><dt>Date</dt><dd>August 2013</dd></dl>
<dl class="section copyright"><dt>Copyright</dt><dd>Copyright (C) 2013 University of Delaware. </dd>
<dd>
QCNSim uses elements of TARVOS simulator, Copyright (C) 2005, 2006, 2007 Marcos Portnoi. </dd></dl>
<dl class="section user"><dt></dt><dd>This file is part of QCNSim. QCNSim is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.<br/>
 QCNSim is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.<br/>
 You should have received a copy of the GNU Lesser General Public License along with QCNSim. If not, see <a href="http://www.gnu.org/licenses/">http://www.gnu.org/licenses/</a>. </dd></dl>
<dl class="section user"><dt>Description</dt><dd>This class implements an exponential traffic generator. Events generated from this class will be distributed in time according to an exponential probability distribution: times will be exponentially distributed, events will "arrive" according to a Poisson probability distribution.</dd></dl>
<p>f(x;tau) = (1/tau)*exp(-(1/tau)*x), for x &gt;= 0. Or, f(x;lambda) = lambda*exp(-lambda*x), for x &gt;= 0.</p>
<p>where lambda is the arrival rate (from Poisson) and tau is the interarrival time, or 1/lambda. </p>

<p>Definition at line <a class="el" href="_exponential_traffic_generator_8h_source.html#l00039">39</a> of file <a class="el" href="_exponential_traffic_generator_8h_source.html">ExponentialTrafficGenerator.h</a>.</p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a2309416e72a708196f84f8f8ef80b714"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ExponentialTrafficGenerator::ExponentialTrafficGenerator </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_simulator_globals.html">SimulatorGlobals</a> &amp;&#160;</td>
          <td class="paramname"><em>simulatorGlobals</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_scheduler.html">Scheduler</a> &amp;&#160;</td>
          <td class="paramname"><em>scheduler</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="_event_type_8h.html#a2628ea8d12e8b2563c32f05dc7fff6fa">EventType</a>&#160;</td>
          <td class="paramname"><em>eventType</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::shared_ptr&lt; <a class="el" href="class_entity.html">Entity</a> &gt;&#160;</td>
          <td class="paramname"><em>tokenContents</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::shared_ptr&lt; <a class="el" href="class_entity.html">Entity</a> &gt;&#160;</td>
          <td class="paramname"><em>source</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::shared_ptr&lt; <a class="el" href="class_entity.html">Entity</a> &gt;&#160;</td>
          <td class="paramname"><em>destination</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>priority</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>tau</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="section author"><dt>Author</dt><dd>Marcos Portnoi </dd></dl>
<dl class="section date"><dt>Date</dt><dd>July 2013</dd></dl>
<dl class="section copyright"><dt>Copyright</dt><dd>Copyright (C) 2013 University of Delaware. </dd>
<dd>
QCNSim uses elements of TARVOS simulator, Copyright (C) 2005, 2006, 2007 Marcos Portnoi. </dd></dl>
<dl class="section user"><dt></dt><dd>This file is part of QCNSim. QCNSim is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.<br/>
 QCNSim is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.<br/>
 You should have received a copy of the GNU Lesser General Public License along with QCNSim. If not, see <a href="http://www.gnu.org/licenses/">http://www.gnu.org/licenses/</a>. Constructor with parameter.</dd></dl>
<p>The seed for the random number generator is controlled by <a class="el" href="class_simulator_globals.html" title="Simulator-scope variables and parameters. ">SimulatorGlobals</a>. If none is ever specified, random_device output is used as seed.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">simulatorGlobals</td><td>Reference to <a class="el" href="class_simulator_globals.html" title="Simulator-scope variables and parameters. ">SimulatorGlobals</a> object, to get random generator info. </td></tr>
    <tr><td class="paramname">scheduler</td><td>Reference to <a class="el" href="class_scheduler.html" title="Scheduler class. ">Scheduler</a> object, such that traffic generators may schedule their events. </td></tr>
    <tr><td class="paramname">eventType</td><td><a class="el" href="class_event.html" title="Event class. ">Event</a> type that this generator will produce. </td></tr>
    <tr><td class="paramname">tokenContents</td><td>Reference to <a class="el" href="class_entity.html" title="Entity class. ">Entity</a> object that will be carried by the token. </td></tr>
    <tr><td class="paramname">source</td><td><a class="el" href="class_entity.html" title="Entity class. ">Entity</a> to which the generator is attached (to which tokens are generated). </td></tr>
    <tr><td class="paramname">destination</td><td>Destination entity, to which the generated tokens will be sent. </td></tr>
    <tr><td class="paramname">priority</td><td><a class="el" href="class_token.html" title="Token class. ">Token</a> priority. Higher priority, higher number. </td></tr>
    <tr><td class="paramname">tau</td><td>Mean interarrival time (or inverse rate or arrival, lambda) for exponential probability distribution. </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="_exponential_traffic_generator_8cpp_source.html#l00037">37</a> of file <a class="el" href="_exponential_traffic_generator_8cpp_source.html">ExponentialTrafficGenerator.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;                                                                                                  : <a class="code" href="class_traffic_generator.html#a6fcdb1ce1b3fb4f35c021ea8b99f6cf5">TrafficGenerator</a>(simulatorGlobals, scheduler, <a class="code" href="class_traffic_generator.html#a84eef27cdbfa66bbf8c14e0128196a62">eventType</a>, <a class="code" href="class_traffic_generator.html#acb5d8009cf49ff99a6fee75ec456e166">tokenContents</a>,</div>
<div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;        <a class="code" href="class_traffic_generator.html#a4f69b85034831c2c40e789b0c0e11511">source</a>, <a class="code" href="class_traffic_generator.html#a6ba09ea9c5df93de64af75886df0b11b">destination</a>, <a class="code" href="class_traffic_generator.html#a2158c9e714171e5a04032571021b23c4">priority</a>), <a class="code" href="class_exponential_traffic_generator.html#ac4d67b1f01cd5d96e83e2b7c6d4ad841">tau</a>(<a class="code" href="class_exponential_traffic_generator.html#ac4d67b1f01cd5d96e83e2b7c6d4ad841">tau</a>) {</div>
<div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;    <span class="comment">//this-&gt;tau = tau;</span></div>
<div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;    <span class="comment">//exponentialDistribution(tau);</span></div>
<div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;}</div>
<div class="ttc" id="class_traffic_generator_html_a6fcdb1ce1b3fb4f35c021ea8b99f6cf5"><div class="ttname"><a href="class_traffic_generator.html#a6fcdb1ce1b3fb4f35c021ea8b99f6cf5">TrafficGenerator::TrafficGenerator</a></div><div class="ttdeci">TrafficGenerator(SimulatorGlobals &amp;simulatorGlobals, Scheduler &amp;scheduler, EventType eventType, std::shared_ptr&lt; Entity &gt; tokenContents, std::shared_ptr&lt; Entity &gt; source, std::shared_ptr&lt; Entity &gt; destination, int priority)</div><div class="ttdef"><b>Definition:</b> <a href="_traffic_generator_8cpp_source.html#l00037">TrafficGenerator.cpp:37</a></div></div>
<div class="ttc" id="class_exponential_traffic_generator_html_ac4d67b1f01cd5d96e83e2b7c6d4ad841"><div class="ttname"><a href="class_exponential_traffic_generator.html#ac4d67b1f01cd5d96e83e2b7c6d4ad841">ExponentialTrafficGenerator::tau</a></div><div class="ttdeci">double tau</div><div class="ttdoc">Mean interarrival time for exponential probability distribution. </div><div class="ttdef"><b>Definition:</b> <a href="_exponential_traffic_generator_8h_source.html#l00041">ExponentialTrafficGenerator.h:41</a></div></div>
<div class="ttc" id="class_traffic_generator_html_a84eef27cdbfa66bbf8c14e0128196a62"><div class="ttname"><a href="class_traffic_generator.html#a84eef27cdbfa66bbf8c14e0128196a62">TrafficGenerator::eventType</a></div><div class="ttdeci">EventType eventType</div><div class="ttdoc">Event type that this generator will produce. </div><div class="ttdef"><b>Definition:</b> <a href="_traffic_generator_8h_source.html#l00046">TrafficGenerator.h:46</a></div></div>
<div class="ttc" id="class_traffic_generator_html_acb5d8009cf49ff99a6fee75ec456e166"><div class="ttname"><a href="class_traffic_generator.html#acb5d8009cf49ff99a6fee75ec456e166">TrafficGenerator::tokenContents</a></div><div class="ttdeci">std::shared_ptr&lt; Entity &gt; tokenContents</div><div class="ttdoc">Reference to Entity object that will be carried by the token. </div><div class="ttdef"><b>Definition:</b> <a href="_traffic_generator_8h_source.html#l00047">TrafficGenerator.h:47</a></div></div>
<div class="ttc" id="class_traffic_generator_html_a2158c9e714171e5a04032571021b23c4"><div class="ttname"><a href="class_traffic_generator.html#a2158c9e714171e5a04032571021b23c4">TrafficGenerator::priority</a></div><div class="ttdeci">int priority</div><div class="ttdoc">Token priority. Higher priority, higher number. </div><div class="ttdef"><b>Definition:</b> <a href="_traffic_generator_8h_source.html#l00050">TrafficGenerator.h:50</a></div></div>
<div class="ttc" id="class_traffic_generator_html_a4f69b85034831c2c40e789b0c0e11511"><div class="ttname"><a href="class_traffic_generator.html#a4f69b85034831c2c40e789b0c0e11511">TrafficGenerator::source</a></div><div class="ttdeci">std::shared_ptr&lt; Entity &gt; source</div><div class="ttdoc">Entity to which the generator is attached (to which tokens are generated). </div><div class="ttdef"><b>Definition:</b> <a href="_traffic_generator_8h_source.html#l00048">TrafficGenerator.h:48</a></div></div>
<div class="ttc" id="class_traffic_generator_html_a6ba09ea9c5df93de64af75886df0b11b"><div class="ttname"><a href="class_traffic_generator.html#a6ba09ea9c5df93de64af75886df0b11b">TrafficGenerator::destination</a></div><div class="ttdeci">std::shared_ptr&lt; Entity &gt; destination</div><div class="ttdoc">Destination entity, to which the generated tokens will be sent. </div><div class="ttdef"><b>Definition:</b> <a href="_traffic_generator_8h_source.html#l00049">TrafficGenerator.h:49</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a370588812391121414e82498e9d4d61f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ExponentialTrafficGenerator::ExponentialTrafficGenerator </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_simulator_globals.html">SimulatorGlobals</a> &amp;&#160;</td>
          <td class="paramname"><em>simulatorGlobals</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_scheduler.html">Scheduler</a> &amp;&#160;</td>
          <td class="paramname"><em>scheduler</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="_event_type_8h.html#a2628ea8d12e8b2563c32f05dc7fff6fa">EventType</a>&#160;</td>
          <td class="paramname"><em>eventType</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::shared_ptr&lt; <a class="el" href="class_entity.html">Entity</a> &gt;&#160;</td>
          <td class="paramname"><em>tokenContents</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::shared_ptr&lt; <a class="el" href="class_entity.html">Entity</a> &gt;&#160;</td>
          <td class="paramname"><em>source</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::shared_ptr&lt; <a class="el" href="class_entity.html">Entity</a> &gt;&#160;</td>
          <td class="paramname"><em>destination</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>priority</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>tau</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned int&#160;</td>
          <td class="paramname"><em>seed</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Constructor with parameters, seed as parameter.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">simulatorGlobals</td><td>Reference to <a class="el" href="class_simulator_globals.html" title="Simulator-scope variables and parameters. ">SimulatorGlobals</a> object, to get random generator info. </td></tr>
    <tr><td class="paramname">scheduler</td><td>Reference to <a class="el" href="class_scheduler.html" title="Scheduler class. ">Scheduler</a> object, such that traffic generators may schedule their events. </td></tr>
    <tr><td class="paramname">eventType</td><td><a class="el" href="class_event.html" title="Event class. ">Event</a> type that this generator will produce. </td></tr>
    <tr><td class="paramname">tokenContents</td><td>Reference to <a class="el" href="class_entity.html" title="Entity class. ">Entity</a> object that will be carried by the token. </td></tr>
    <tr><td class="paramname">source</td><td><a class="el" href="class_entity.html" title="Entity class. ">Entity</a> to which the generator is attached (to which tokens are generated). </td></tr>
    <tr><td class="paramname">destination</td><td>Destination entity, to which the generated tokens will be sent. </td></tr>
    <tr><td class="paramname">priority</td><td><a class="el" href="class_token.html" title="Token class. ">Token</a> priority. Higher priority, higher number. </td></tr>
    <tr><td class="paramname">tau</td><td>Mean interarrival time (or inverse rate or arrival, lambda) for exponential probability distribution. </td></tr>
    <tr><td class="paramname">seed</td><td>Seed to the default random number generator, to be passed to <a class="el" href="class_simulator_globals.html" title="Simulator-scope variables and parameters. ">SimulatorGlobals</a> object. </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="_exponential_traffic_generator_8cpp_source.html#l00057">57</a> of file <a class="el" href="_exponential_traffic_generator_8cpp_source.html">ExponentialTrafficGenerator.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;                                                                                                                     : <a class="code" href="class_traffic_generator.html#a6fcdb1ce1b3fb4f35c021ea8b99f6cf5">TrafficGenerator</a>(simulatorGlobals, scheduler, <a class="code" href="class_traffic_generator.html#a84eef27cdbfa66bbf8c14e0128196a62">eventType</a>, <a class="code" href="class_traffic_generator.html#acb5d8009cf49ff99a6fee75ec456e166">tokenContents</a>,</div>
<div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;        <a class="code" href="class_traffic_generator.html#a4f69b85034831c2c40e789b0c0e11511">source</a>, <a class="code" href="class_traffic_generator.html#a6ba09ea9c5df93de64af75886df0b11b">destination</a>, <a class="code" href="class_traffic_generator.html#a2158c9e714171e5a04032571021b23c4">priority</a>, seed), <a class="code" href="class_exponential_traffic_generator.html#ac4d67b1f01cd5d96e83e2b7c6d4ad841">tau</a>(<a class="code" href="class_exponential_traffic_generator.html#ac4d67b1f01cd5d96e83e2b7c6d4ad841">tau</a>) {</div>
<div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;    <span class="comment">//this-&gt;tau = tau;</span></div>
<div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;    <span class="comment">//exponentialDistribution.;</span></div>
<div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;}</div>
<div class="ttc" id="class_traffic_generator_html_a6fcdb1ce1b3fb4f35c021ea8b99f6cf5"><div class="ttname"><a href="class_traffic_generator.html#a6fcdb1ce1b3fb4f35c021ea8b99f6cf5">TrafficGenerator::TrafficGenerator</a></div><div class="ttdeci">TrafficGenerator(SimulatorGlobals &amp;simulatorGlobals, Scheduler &amp;scheduler, EventType eventType, std::shared_ptr&lt; Entity &gt; tokenContents, std::shared_ptr&lt; Entity &gt; source, std::shared_ptr&lt; Entity &gt; destination, int priority)</div><div class="ttdef"><b>Definition:</b> <a href="_traffic_generator_8cpp_source.html#l00037">TrafficGenerator.cpp:37</a></div></div>
<div class="ttc" id="class_exponential_traffic_generator_html_ac4d67b1f01cd5d96e83e2b7c6d4ad841"><div class="ttname"><a href="class_exponential_traffic_generator.html#ac4d67b1f01cd5d96e83e2b7c6d4ad841">ExponentialTrafficGenerator::tau</a></div><div class="ttdeci">double tau</div><div class="ttdoc">Mean interarrival time for exponential probability distribution. </div><div class="ttdef"><b>Definition:</b> <a href="_exponential_traffic_generator_8h_source.html#l00041">ExponentialTrafficGenerator.h:41</a></div></div>
<div class="ttc" id="class_traffic_generator_html_a84eef27cdbfa66bbf8c14e0128196a62"><div class="ttname"><a href="class_traffic_generator.html#a84eef27cdbfa66bbf8c14e0128196a62">TrafficGenerator::eventType</a></div><div class="ttdeci">EventType eventType</div><div class="ttdoc">Event type that this generator will produce. </div><div class="ttdef"><b>Definition:</b> <a href="_traffic_generator_8h_source.html#l00046">TrafficGenerator.h:46</a></div></div>
<div class="ttc" id="class_traffic_generator_html_acb5d8009cf49ff99a6fee75ec456e166"><div class="ttname"><a href="class_traffic_generator.html#acb5d8009cf49ff99a6fee75ec456e166">TrafficGenerator::tokenContents</a></div><div class="ttdeci">std::shared_ptr&lt; Entity &gt; tokenContents</div><div class="ttdoc">Reference to Entity object that will be carried by the token. </div><div class="ttdef"><b>Definition:</b> <a href="_traffic_generator_8h_source.html#l00047">TrafficGenerator.h:47</a></div></div>
<div class="ttc" id="class_traffic_generator_html_a2158c9e714171e5a04032571021b23c4"><div class="ttname"><a href="class_traffic_generator.html#a2158c9e714171e5a04032571021b23c4">TrafficGenerator::priority</a></div><div class="ttdeci">int priority</div><div class="ttdoc">Token priority. Higher priority, higher number. </div><div class="ttdef"><b>Definition:</b> <a href="_traffic_generator_8h_source.html#l00050">TrafficGenerator.h:50</a></div></div>
<div class="ttc" id="class_traffic_generator_html_a4f69b85034831c2c40e789b0c0e11511"><div class="ttname"><a href="class_traffic_generator.html#a4f69b85034831c2c40e789b0c0e11511">TrafficGenerator::source</a></div><div class="ttdeci">std::shared_ptr&lt; Entity &gt; source</div><div class="ttdoc">Entity to which the generator is attached (to which tokens are generated). </div><div class="ttdef"><b>Definition:</b> <a href="_traffic_generator_8h_source.html#l00048">TrafficGenerator.h:48</a></div></div>
<div class="ttc" id="class_traffic_generator_html_a6ba09ea9c5df93de64af75886df0b11b"><div class="ttname"><a href="class_traffic_generator.html#a6ba09ea9c5df93de64af75886df0b11b">TrafficGenerator::destination</a></div><div class="ttdeci">std::shared_ptr&lt; Entity &gt; destination</div><div class="ttdoc">Destination entity, to which the generated tokens will be sent. </div><div class="ttdef"><b>Definition:</b> <a href="_traffic_generator_8h_source.html#l00049">TrafficGenerator.h:49</a></div></div>
</div><!-- fragment -->
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a9095b69f4e9eee6c4027ab9672916157"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::shared_ptr&lt; <a class="el" href="class_token.html">Token</a> &gt; ExponentialTrafficGenerator::createInstanceTrafficEvent </td>
          <td>(</td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>recordRoute</em> = <code>false</code></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">override</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Creates an instance of exponential traffic event.</p>
<p>Calls parent function and complements with event generation and exponential random variate. Uses member variable tokenContents.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">recordRoute</td><td>True if this generated token should record the route it follows. False otherwise. Default is false. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="class_token.html" title="Token class. ">Token</a> that was generated, per the class constructor parameters and if generator is On. Otherwise, returns nullptr. </dd></dl>

<p>Implements <a class="el" href="class_traffic_generator.html#aa1943a93355f1856e639a0f163413249">TrafficGenerator</a>.</p>

<p>Definition at line <a class="el" href="_exponential_traffic_generator_8cpp_source.html#l00074">74</a> of file <a class="el" href="_exponential_traffic_generator_8cpp_source.html">ExponentialTrafficGenerator.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;                                                                                             {</div>
<div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;    <span class="comment">// Creates a token and assigns it class member values and a unique ID obtained from simulatorGlobals.</span></div>
<div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;    std::shared_ptr&lt;Token&gt; token = <a class="code" href="class_traffic_generator.html#aa1943a93355f1856e639a0f163413249">TrafficGenerator::createInstanceTrafficEvent</a>(recordRoute);</div>
<div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;    <span class="keywordflow">if</span> (token != <span class="keyword">nullptr</span>) {</div>
<div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;        <a class="code" href="class_traffic_generator.html#a9569cd494b926b84f384c7380349d51a">scheduler</a>.<a class="code" href="class_scheduler.html#ae84f19f548d606f50fba69d00fe691b1">schedule</a>(<a class="code" href="class_event.html">Event</a>(<a class="code" href="class_exponential_traffic_generator.html#a6d33c94dd3918359ee75d51bb002e670">generateExponentialVariate</a>(), <a class="code" href="class_traffic_generator.html#a84eef27cdbfa66bbf8c14e0128196a62">eventType</a>, token));</div>
<div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;    }</div>
<div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;    <span class="keywordflow">return</span> token;</div>
<div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;}</div>
<div class="ttc" id="class_event_html"><div class="ttname"><a href="class_event.html">Event</a></div><div class="ttdoc">Event class. </div><div class="ttdef"><b>Definition:</b> <a href="_event_8h_source.html#l00035">Event.h:35</a></div></div>
<div class="ttc" id="class_scheduler_html_ae84f19f548d606f50fba69d00fe691b1"><div class="ttname"><a href="class_scheduler.html#ae84f19f548d606f50fba69d00fe691b1">Scheduler::schedule</a></div><div class="ttdeci">void schedule(const Event &amp;event)</div><div class="ttdef"><b>Definition:</b> <a href="_scheduler_8cpp_source.html#l00056">Scheduler.cpp:56</a></div></div>
<div class="ttc" id="class_traffic_generator_html_aa1943a93355f1856e639a0f163413249"><div class="ttname"><a href="class_traffic_generator.html#aa1943a93355f1856e639a0f163413249">TrafficGenerator::createInstanceTrafficEvent</a></div><div class="ttdeci">virtual std::shared_ptr&lt; Token &gt; createInstanceTrafficEvent(bool recordRoute=false)=0</div><div class="ttdef"><b>Definition:</b> <a href="_traffic_generator_8cpp_source.html#l00075">TrafficGenerator.cpp:75</a></div></div>
<div class="ttc" id="class_traffic_generator_html_a84eef27cdbfa66bbf8c14e0128196a62"><div class="ttname"><a href="class_traffic_generator.html#a84eef27cdbfa66bbf8c14e0128196a62">TrafficGenerator::eventType</a></div><div class="ttdeci">EventType eventType</div><div class="ttdoc">Event type that this generator will produce. </div><div class="ttdef"><b>Definition:</b> <a href="_traffic_generator_8h_source.html#l00046">TrafficGenerator.h:46</a></div></div>
<div class="ttc" id="class_traffic_generator_html_a9569cd494b926b84f384c7380349d51a"><div class="ttname"><a href="class_traffic_generator.html#a9569cd494b926b84f384c7380349d51a">TrafficGenerator::scheduler</a></div><div class="ttdeci">Scheduler &amp; scheduler</div><div class="ttdoc">Reference to Scheduler object, such that traffic generators may schedule their events. </div><div class="ttdef"><b>Definition:</b> <a href="_traffic_generator_8h_source.html#l00044">TrafficGenerator.h:44</a></div></div>
<div class="ttc" id="class_exponential_traffic_generator_html_a6d33c94dd3918359ee75d51bb002e670"><div class="ttname"><a href="class_exponential_traffic_generator.html#a6d33c94dd3918359ee75d51bb002e670">ExponentialTrafficGenerator::generateExponentialVariate</a></div><div class="ttdeci">double generateExponentialVariate()</div><div class="ttdef"><b>Definition:</b> <a href="_exponential_traffic_generator_8cpp_source.html#l00157">ExponentialTrafficGenerator.cpp:157</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="af8bddbc12219130dad0908a2a2df76b4"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::shared_ptr&lt; <a class="el" href="class_token.html">Token</a> &gt; ExponentialTrafficGenerator::createInstanceTrafficEvent </td>
          <td>(</td>
          <td class="paramtype">std::shared_ptr&lt; <a class="el" href="class_entity.html">Entity</a> &gt;&#160;</td>
          <td class="paramname"><em>tokenContents</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>recordRoute</em> = <code>false</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">override</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Creates an instance of exponential traffic event.</p>
<p>Calls parent function and complements with event generation and exponential random variate. Uses parameter tokenContents.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">tokenContents</td><td>Reference to <a class="el" href="class_entity.html" title="Entity class. ">Entity</a> object that will be carried by the token. </td></tr>
    <tr><td class="paramname">recordRoute</td><td>True if this generated token should record the route it follows. False otherwise. Default is false.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="class_token.html" title="Token class. ">Token</a> that was generated, per the class constructor parameters and if generator is On. Otherwise, returns nullptr. </dd></dl>

<p>Implements <a class="el" href="class_traffic_generator.html#a49bef7ab761909d3b21f057a0f24b135">TrafficGenerator</a>.</p>

<p>Definition at line <a class="el" href="_exponential_traffic_generator_8cpp_source.html#l00095">95</a> of file <a class="el" href="_exponential_traffic_generator_8cpp_source.html">ExponentialTrafficGenerator.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;                                                                                                                                  {</div>
<div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;    <span class="comment">// Creates a token and assigns it class member values and a unique ID obtained from simulatorGlobals.</span></div>
<div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;    std::shared_ptr&lt;Token&gt; token = <a class="code" href="class_traffic_generator.html#aa1943a93355f1856e639a0f163413249">TrafficGenerator::createInstanceTrafficEvent</a>(<a class="code" href="class_traffic_generator.html#acb5d8009cf49ff99a6fee75ec456e166">tokenContents</a>, recordRoute);</div>
<div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;    <span class="keywordflow">if</span> (token != <span class="keyword">nullptr</span>) {</div>
<div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;        <a class="code" href="class_traffic_generator.html#a9569cd494b926b84f384c7380349d51a">scheduler</a>.<a class="code" href="class_scheduler.html#ae84f19f548d606f50fba69d00fe691b1">schedule</a>(<a class="code" href="class_event.html">Event</a>(<a class="code" href="class_exponential_traffic_generator.html#a6d33c94dd3918359ee75d51bb002e670">generateExponentialVariate</a>(), <a class="code" href="class_traffic_generator.html#a84eef27cdbfa66bbf8c14e0128196a62">eventType</a>, token));</div>
<div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;    }</div>
<div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;    <span class="keywordflow">return</span> token;</div>
<div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;}</div>
<div class="ttc" id="class_event_html"><div class="ttname"><a href="class_event.html">Event</a></div><div class="ttdoc">Event class. </div><div class="ttdef"><b>Definition:</b> <a href="_event_8h_source.html#l00035">Event.h:35</a></div></div>
<div class="ttc" id="class_scheduler_html_ae84f19f548d606f50fba69d00fe691b1"><div class="ttname"><a href="class_scheduler.html#ae84f19f548d606f50fba69d00fe691b1">Scheduler::schedule</a></div><div class="ttdeci">void schedule(const Event &amp;event)</div><div class="ttdef"><b>Definition:</b> <a href="_scheduler_8cpp_source.html#l00056">Scheduler.cpp:56</a></div></div>
<div class="ttc" id="class_traffic_generator_html_aa1943a93355f1856e639a0f163413249"><div class="ttname"><a href="class_traffic_generator.html#aa1943a93355f1856e639a0f163413249">TrafficGenerator::createInstanceTrafficEvent</a></div><div class="ttdeci">virtual std::shared_ptr&lt; Token &gt; createInstanceTrafficEvent(bool recordRoute=false)=0</div><div class="ttdef"><b>Definition:</b> <a href="_traffic_generator_8cpp_source.html#l00075">TrafficGenerator.cpp:75</a></div></div>
<div class="ttc" id="class_traffic_generator_html_a84eef27cdbfa66bbf8c14e0128196a62"><div class="ttname"><a href="class_traffic_generator.html#a84eef27cdbfa66bbf8c14e0128196a62">TrafficGenerator::eventType</a></div><div class="ttdeci">EventType eventType</div><div class="ttdoc">Event type that this generator will produce. </div><div class="ttdef"><b>Definition:</b> <a href="_traffic_generator_8h_source.html#l00046">TrafficGenerator.h:46</a></div></div>
<div class="ttc" id="class_traffic_generator_html_acb5d8009cf49ff99a6fee75ec456e166"><div class="ttname"><a href="class_traffic_generator.html#acb5d8009cf49ff99a6fee75ec456e166">TrafficGenerator::tokenContents</a></div><div class="ttdeci">std::shared_ptr&lt; Entity &gt; tokenContents</div><div class="ttdoc">Reference to Entity object that will be carried by the token. </div><div class="ttdef"><b>Definition:</b> <a href="_traffic_generator_8h_source.html#l00047">TrafficGenerator.h:47</a></div></div>
<div class="ttc" id="class_traffic_generator_html_a9569cd494b926b84f384c7380349d51a"><div class="ttname"><a href="class_traffic_generator.html#a9569cd494b926b84f384c7380349d51a">TrafficGenerator::scheduler</a></div><div class="ttdeci">Scheduler &amp; scheduler</div><div class="ttdoc">Reference to Scheduler object, such that traffic generators may schedule their events. </div><div class="ttdef"><b>Definition:</b> <a href="_traffic_generator_8h_source.html#l00044">TrafficGenerator.h:44</a></div></div>
<div class="ttc" id="class_exponential_traffic_generator_html_a6d33c94dd3918359ee75d51bb002e670"><div class="ttname"><a href="class_exponential_traffic_generator.html#a6d33c94dd3918359ee75d51bb002e670">ExponentialTrafficGenerator::generateExponentialVariate</a></div><div class="ttdeci">double generateExponentialVariate()</div><div class="ttdef"><b>Definition:</b> <a href="_exponential_traffic_generator_8cpp_source.html#l00157">ExponentialTrafficGenerator.cpp:157</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="af7e29232e74258ac42c5d82f4200ee25"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::shared_ptr&lt; <a class="el" href="class_token.html">Token</a> &gt; ExponentialTrafficGenerator::createInstanceTrafficEvent </td>
          <td>(</td>
          <td class="paramtype">std::vector&lt; std::shared_ptr&lt; <a class="el" href="class_entity.html">Entity</a> &gt;&gt;&#160;</td>
          <td class="paramname"><em>explicitRoute</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>recordRoute</em> = <code>false</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">override</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Creates an instance of exponential traffic event.</p>
<p>Calls parent function and complements with event generation and exponential random variate. Uses member variable tokenContents and parameter explicit route.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">explicitRoute</td><td>Vector containing a list of <a class="el" href="class_entity.html" title="Entity class. ">Entity</a> objects representing the route to be followed by a token/PDU. </td></tr>
    <tr><td class="paramname">recordRoute</td><td>True if this generated token should record the route it follows. False otherwise. Default is false.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="class_token.html" title="Token class. ">Token</a> that was generated, per the class constructor parameters and if generator is On. Otherwise, returns nullptr. </dd></dl>

<p>Implements <a class="el" href="class_traffic_generator.html#af51fd5d3e1200ae9e7d849a554647fcd">TrafficGenerator</a>.</p>

<p>Definition at line <a class="el" href="_exponential_traffic_generator_8cpp_source.html#l00116">116</a> of file <a class="el" href="_exponential_traffic_generator_8cpp_source.html">ExponentialTrafficGenerator.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;                                                                                                                                             {</div>
<div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;    <span class="comment">// Creates a token and assigns it class member values and a unique ID obtained from simulatorGlobals.</span></div>
<div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;    std::shared_ptr&lt;Token&gt; token = <a class="code" href="class_traffic_generator.html#aa1943a93355f1856e639a0f163413249">TrafficGenerator::createInstanceTrafficEvent</a>(explicitRoute, recordRoute);</div>
<div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;    <span class="keywordflow">if</span> (token != <span class="keyword">nullptr</span>) {</div>
<div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;        <a class="code" href="class_traffic_generator.html#a9569cd494b926b84f384c7380349d51a">scheduler</a>.<a class="code" href="class_scheduler.html#ae84f19f548d606f50fba69d00fe691b1">schedule</a>(<a class="code" href="class_event.html">Event</a>(<a class="code" href="class_exponential_traffic_generator.html#a6d33c94dd3918359ee75d51bb002e670">generateExponentialVariate</a>(), <a class="code" href="class_traffic_generator.html#a84eef27cdbfa66bbf8c14e0128196a62">eventType</a>, token));</div>
<div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160;    }</div>
<div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160;    <span class="keywordflow">return</span> token;</div>
<div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;}</div>
<div class="ttc" id="class_event_html"><div class="ttname"><a href="class_event.html">Event</a></div><div class="ttdoc">Event class. </div><div class="ttdef"><b>Definition:</b> <a href="_event_8h_source.html#l00035">Event.h:35</a></div></div>
<div class="ttc" id="class_scheduler_html_ae84f19f548d606f50fba69d00fe691b1"><div class="ttname"><a href="class_scheduler.html#ae84f19f548d606f50fba69d00fe691b1">Scheduler::schedule</a></div><div class="ttdeci">void schedule(const Event &amp;event)</div><div class="ttdef"><b>Definition:</b> <a href="_scheduler_8cpp_source.html#l00056">Scheduler.cpp:56</a></div></div>
<div class="ttc" id="class_traffic_generator_html_aa1943a93355f1856e639a0f163413249"><div class="ttname"><a href="class_traffic_generator.html#aa1943a93355f1856e639a0f163413249">TrafficGenerator::createInstanceTrafficEvent</a></div><div class="ttdeci">virtual std::shared_ptr&lt; Token &gt; createInstanceTrafficEvent(bool recordRoute=false)=0</div><div class="ttdef"><b>Definition:</b> <a href="_traffic_generator_8cpp_source.html#l00075">TrafficGenerator.cpp:75</a></div></div>
<div class="ttc" id="class_traffic_generator_html_a84eef27cdbfa66bbf8c14e0128196a62"><div class="ttname"><a href="class_traffic_generator.html#a84eef27cdbfa66bbf8c14e0128196a62">TrafficGenerator::eventType</a></div><div class="ttdeci">EventType eventType</div><div class="ttdoc">Event type that this generator will produce. </div><div class="ttdef"><b>Definition:</b> <a href="_traffic_generator_8h_source.html#l00046">TrafficGenerator.h:46</a></div></div>
<div class="ttc" id="class_traffic_generator_html_a9569cd494b926b84f384c7380349d51a"><div class="ttname"><a href="class_traffic_generator.html#a9569cd494b926b84f384c7380349d51a">TrafficGenerator::scheduler</a></div><div class="ttdeci">Scheduler &amp; scheduler</div><div class="ttdoc">Reference to Scheduler object, such that traffic generators may schedule their events. </div><div class="ttdef"><b>Definition:</b> <a href="_traffic_generator_8h_source.html#l00044">TrafficGenerator.h:44</a></div></div>
<div class="ttc" id="class_exponential_traffic_generator_html_a6d33c94dd3918359ee75d51bb002e670"><div class="ttname"><a href="class_exponential_traffic_generator.html#a6d33c94dd3918359ee75d51bb002e670">ExponentialTrafficGenerator::generateExponentialVariate</a></div><div class="ttdeci">double generateExponentialVariate()</div><div class="ttdef"><b>Definition:</b> <a href="_exponential_traffic_generator_8cpp_source.html#l00157">ExponentialTrafficGenerator.cpp:157</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="acfc98aa272007bf6f46639aba122e12a"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::shared_ptr&lt; <a class="el" href="class_token.html">Token</a> &gt; ExponentialTrafficGenerator::createInstanceTrafficEvent </td>
          <td>(</td>
          <td class="paramtype">std::shared_ptr&lt; <a class="el" href="class_entity.html">Entity</a> &gt;&#160;</td>
          <td class="paramname"><em>tokenContents</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::vector&lt; std::shared_ptr&lt; <a class="el" href="class_entity.html">Entity</a> &gt;&gt;&#160;</td>
          <td class="paramname"><em>explicitRoute</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>recordRoute</em> = <code>false</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">override</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Creates an instance of exponential traffic event.</p>
<p>Calls parent function and complements with event generation and exponential random variate. Uses parameter tokenContents and explicit route.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">tokenContents</td><td>Reference to <a class="el" href="class_entity.html" title="Entity class. ">Entity</a> object that will be carried by the token. </td></tr>
    <tr><td class="paramname">explicitRoute</td><td>Vector containing a list of <a class="el" href="class_entity.html" title="Entity class. ">Entity</a> objects representing the route to be followed by a token/PDU. </td></tr>
    <tr><td class="paramname">recordRoute</td><td>True if this generated token should record the route it follows. False otherwise. Default is false.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="class_token.html" title="Token class. ">Token</a> that was generated, per the class constructor parameters and if generator is On. Otherwise, returns nullptr. </dd></dl>

<p>Implements <a class="el" href="class_traffic_generator.html#ac0ccf573b26189a81bcbb4d66b28a922">TrafficGenerator</a>.</p>

<p>Definition at line <a class="el" href="_exponential_traffic_generator_8cpp_source.html#l00138">138</a> of file <a class="el" href="_exponential_traffic_generator_8cpp_source.html">ExponentialTrafficGenerator.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160;                                                                                                                                                                                  {</div>
<div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160;    <span class="comment">// Creates a token and assigns it class member values and a unique ID obtained from simulatorGlobals.</span></div>
<div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160;    std::shared_ptr&lt;Token&gt; token = <a class="code" href="class_traffic_generator.html#aa1943a93355f1856e639a0f163413249">TrafficGenerator::createInstanceTrafficEvent</a>(<a class="code" href="class_traffic_generator.html#acb5d8009cf49ff99a6fee75ec456e166">tokenContents</a>, explicitRoute, recordRoute);</div>
<div class="line"><a name="l00141"></a><span class="lineno">  141</span>&#160;    <span class="keywordflow">if</span> (token != <span class="keyword">nullptr</span>) {</div>
<div class="line"><a name="l00142"></a><span class="lineno">  142</span>&#160;        <a class="code" href="class_traffic_generator.html#a9569cd494b926b84f384c7380349d51a">scheduler</a>.<a class="code" href="class_scheduler.html#ae84f19f548d606f50fba69d00fe691b1">schedule</a>(<a class="code" href="class_event.html">Event</a>(<a class="code" href="class_exponential_traffic_generator.html#a6d33c94dd3918359ee75d51bb002e670">generateExponentialVariate</a>(), <a class="code" href="class_traffic_generator.html#a84eef27cdbfa66bbf8c14e0128196a62">eventType</a>, token));</div>
<div class="line"><a name="l00143"></a><span class="lineno">  143</span>&#160;    }</div>
<div class="line"><a name="l00144"></a><span class="lineno">  144</span>&#160;    <span class="keywordflow">return</span> token;</div>
<div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160;}</div>
<div class="ttc" id="class_event_html"><div class="ttname"><a href="class_event.html">Event</a></div><div class="ttdoc">Event class. </div><div class="ttdef"><b>Definition:</b> <a href="_event_8h_source.html#l00035">Event.h:35</a></div></div>
<div class="ttc" id="class_scheduler_html_ae84f19f548d606f50fba69d00fe691b1"><div class="ttname"><a href="class_scheduler.html#ae84f19f548d606f50fba69d00fe691b1">Scheduler::schedule</a></div><div class="ttdeci">void schedule(const Event &amp;event)</div><div class="ttdef"><b>Definition:</b> <a href="_scheduler_8cpp_source.html#l00056">Scheduler.cpp:56</a></div></div>
<div class="ttc" id="class_traffic_generator_html_aa1943a93355f1856e639a0f163413249"><div class="ttname"><a href="class_traffic_generator.html#aa1943a93355f1856e639a0f163413249">TrafficGenerator::createInstanceTrafficEvent</a></div><div class="ttdeci">virtual std::shared_ptr&lt; Token &gt; createInstanceTrafficEvent(bool recordRoute=false)=0</div><div class="ttdef"><b>Definition:</b> <a href="_traffic_generator_8cpp_source.html#l00075">TrafficGenerator.cpp:75</a></div></div>
<div class="ttc" id="class_traffic_generator_html_a84eef27cdbfa66bbf8c14e0128196a62"><div class="ttname"><a href="class_traffic_generator.html#a84eef27cdbfa66bbf8c14e0128196a62">TrafficGenerator::eventType</a></div><div class="ttdeci">EventType eventType</div><div class="ttdoc">Event type that this generator will produce. </div><div class="ttdef"><b>Definition:</b> <a href="_traffic_generator_8h_source.html#l00046">TrafficGenerator.h:46</a></div></div>
<div class="ttc" id="class_traffic_generator_html_acb5d8009cf49ff99a6fee75ec456e166"><div class="ttname"><a href="class_traffic_generator.html#acb5d8009cf49ff99a6fee75ec456e166">TrafficGenerator::tokenContents</a></div><div class="ttdeci">std::shared_ptr&lt; Entity &gt; tokenContents</div><div class="ttdoc">Reference to Entity object that will be carried by the token. </div><div class="ttdef"><b>Definition:</b> <a href="_traffic_generator_8h_source.html#l00047">TrafficGenerator.h:47</a></div></div>
<div class="ttc" id="class_traffic_generator_html_a9569cd494b926b84f384c7380349d51a"><div class="ttname"><a href="class_traffic_generator.html#a9569cd494b926b84f384c7380349d51a">TrafficGenerator::scheduler</a></div><div class="ttdeci">Scheduler &amp; scheduler</div><div class="ttdoc">Reference to Scheduler object, such that traffic generators may schedule their events. </div><div class="ttdef"><b>Definition:</b> <a href="_traffic_generator_8h_source.html#l00044">TrafficGenerator.h:44</a></div></div>
<div class="ttc" id="class_exponential_traffic_generator_html_a6d33c94dd3918359ee75d51bb002e670"><div class="ttname"><a href="class_exponential_traffic_generator.html#a6d33c94dd3918359ee75d51bb002e670">ExponentialTrafficGenerator::generateExponentialVariate</a></div><div class="ttdeci">double generateExponentialVariate()</div><div class="ttdef"><b>Definition:</b> <a href="_exponential_traffic_generator_8cpp_source.html#l00157">ExponentialTrafficGenerator.cpp:157</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a917831a1c62644aa1b04beaa401b691d"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::shared_ptr&lt; <a class="el" href="class_protocol_data_unit.html">ProtocolDataUnit</a> &gt; ExponentialTrafficGenerator::createInstanceTrafficEventPdu </td>
          <td>(</td>
          <td class="paramtype">unsigned int&#160;</td>
          <td class="paramname"><em>pduSize</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>recordRoute</em> = <code>false</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">override</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Creates an instance of exponential traffic event with PDU. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pduSize</td><td>Size of PDU to generate. </td></tr>
    <tr><td class="paramname">recordRoute</td><td>True if this generated token should record the route it follows. False otherwise. Default is false.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>PDU that was generated, per the class constructor parameters and if generator is On. Otherwise, returns nullptr. </dd></dl>

<p>Implements <a class="el" href="class_traffic_generator.html#a4efc8d0f973cf1ea906c50e85b6e4ec7">TrafficGenerator</a>.</p>

<p>Definition at line <a class="el" href="_exponential_traffic_generator_8cpp_source.html#l00182">182</a> of file <a class="el" href="_exponential_traffic_generator_8cpp_source.html">ExponentialTrafficGenerator.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00182"></a><span class="lineno">  182</span>&#160;                                                                                                                                 {</div>
<div class="line"><a name="l00183"></a><span class="lineno">  183</span>&#160;    <span class="comment">// Creates a PDU and assigns it class member values and a unique ID obtained from simulatorGlobals.</span></div>
<div class="line"><a name="l00184"></a><span class="lineno">  184</span>&#160;    <span class="comment">// Notice that the base class member function &quot;createInstance...&quot; is used here instead of the derived override:</span></div>
<div class="line"><a name="l00185"></a><span class="lineno">  185</span>&#160;    <span class="comment">// the derived override schedules an event, and that is undesired here, since an event can only be scheduled &quot;after&quot; the PDU is created.</span></div>
<div class="line"><a name="l00186"></a><span class="lineno">  186</span>&#160;    std::shared_ptr&lt;Token&gt; token = <a class="code" href="class_traffic_generator.html#aa1943a93355f1856e639a0f163413249">TrafficGenerator::createInstanceTrafficEvent</a>(recordRoute);</div>
<div class="line"><a name="l00187"></a><span class="lineno">  187</span>&#160;    <span class="keywordflow">if</span> (token == <span class="keyword">nullptr</span>) {</div>
<div class="line"><a name="l00188"></a><span class="lineno">  188</span>&#160;        <span class="keywordflow">return</span> <span class="keyword">nullptr</span>;</div>
<div class="line"><a name="l00189"></a><span class="lineno">  189</span>&#160;    }</div>
<div class="line"><a name="l00190"></a><span class="lineno">  190</span>&#160;    <span class="comment">//std::shared_ptr&lt;ProtocolDataUnit&gt; pdu(new ProtocolDataUnit(TrafficGenerator::createInstanceTrafficEvent(recordRoute), pduSize));</span></div>
<div class="line"><a name="l00191"></a><span class="lineno">  191</span>&#160;    std::shared_ptr&lt;ProtocolDataUnit&gt; pdu(<span class="keyword">new</span> <a class="code" href="class_protocol_data_unit.html">ProtocolDataUnit</a>(token, pduSize));</div>
<div class="line"><a name="l00192"></a><span class="lineno">  192</span>&#160;    <span class="keywordflow">if</span> (pdu != <span class="keyword">nullptr</span>) {</div>
<div class="line"><a name="l00193"></a><span class="lineno">  193</span>&#160;        <a class="code" href="class_traffic_generator.html#a9569cd494b926b84f384c7380349d51a">scheduler</a>.<a class="code" href="class_scheduler.html#ae84f19f548d606f50fba69d00fe691b1">schedule</a>(<a class="code" href="class_event.html">Event</a>(<a class="code" href="class_exponential_traffic_generator.html#a6d33c94dd3918359ee75d51bb002e670">generateExponentialVariate</a>(), <a class="code" href="class_traffic_generator.html#a84eef27cdbfa66bbf8c14e0128196a62">eventType</a>, pdu));</div>
<div class="line"><a name="l00194"></a><span class="lineno">  194</span>&#160;    }</div>
<div class="line"><a name="l00195"></a><span class="lineno">  195</span>&#160;    <span class="keywordflow">return</span> pdu;</div>
<div class="line"><a name="l00196"></a><span class="lineno">  196</span>&#160;}</div>
<div class="ttc" id="class_protocol_data_unit_html"><div class="ttname"><a href="class_protocol_data_unit.html">ProtocolDataUnit</a></div><div class="ttdoc">Protocol Data Unit class. </div><div class="ttdef"><b>Definition:</b> <a href="_protocol_data_unit_8h_source.html#l00033">ProtocolDataUnit.h:33</a></div></div>
<div class="ttc" id="class_event_html"><div class="ttname"><a href="class_event.html">Event</a></div><div class="ttdoc">Event class. </div><div class="ttdef"><b>Definition:</b> <a href="_event_8h_source.html#l00035">Event.h:35</a></div></div>
<div class="ttc" id="class_scheduler_html_ae84f19f548d606f50fba69d00fe691b1"><div class="ttname"><a href="class_scheduler.html#ae84f19f548d606f50fba69d00fe691b1">Scheduler::schedule</a></div><div class="ttdeci">void schedule(const Event &amp;event)</div><div class="ttdef"><b>Definition:</b> <a href="_scheduler_8cpp_source.html#l00056">Scheduler.cpp:56</a></div></div>
<div class="ttc" id="class_traffic_generator_html_aa1943a93355f1856e639a0f163413249"><div class="ttname"><a href="class_traffic_generator.html#aa1943a93355f1856e639a0f163413249">TrafficGenerator::createInstanceTrafficEvent</a></div><div class="ttdeci">virtual std::shared_ptr&lt; Token &gt; createInstanceTrafficEvent(bool recordRoute=false)=0</div><div class="ttdef"><b>Definition:</b> <a href="_traffic_generator_8cpp_source.html#l00075">TrafficGenerator.cpp:75</a></div></div>
<div class="ttc" id="class_traffic_generator_html_a84eef27cdbfa66bbf8c14e0128196a62"><div class="ttname"><a href="class_traffic_generator.html#a84eef27cdbfa66bbf8c14e0128196a62">TrafficGenerator::eventType</a></div><div class="ttdeci">EventType eventType</div><div class="ttdoc">Event type that this generator will produce. </div><div class="ttdef"><b>Definition:</b> <a href="_traffic_generator_8h_source.html#l00046">TrafficGenerator.h:46</a></div></div>
<div class="ttc" id="class_traffic_generator_html_a9569cd494b926b84f384c7380349d51a"><div class="ttname"><a href="class_traffic_generator.html#a9569cd494b926b84f384c7380349d51a">TrafficGenerator::scheduler</a></div><div class="ttdeci">Scheduler &amp; scheduler</div><div class="ttdoc">Reference to Scheduler object, such that traffic generators may schedule their events. </div><div class="ttdef"><b>Definition:</b> <a href="_traffic_generator_8h_source.html#l00044">TrafficGenerator.h:44</a></div></div>
<div class="ttc" id="class_exponential_traffic_generator_html_a6d33c94dd3918359ee75d51bb002e670"><div class="ttname"><a href="class_exponential_traffic_generator.html#a6d33c94dd3918359ee75d51bb002e670">ExponentialTrafficGenerator::generateExponentialVariate</a></div><div class="ttdeci">double generateExponentialVariate()</div><div class="ttdef"><b>Definition:</b> <a href="_exponential_traffic_generator_8cpp_source.html#l00157">ExponentialTrafficGenerator.cpp:157</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="ad15ce961a2b52786b83ecea370a4ea7c"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::shared_ptr&lt; <a class="el" href="class_protocol_data_unit.html">ProtocolDataUnit</a> &gt; ExponentialTrafficGenerator::createInstanceTrafficEventPdu </td>
          <td>(</td>
          <td class="paramtype">unsigned int&#160;</td>
          <td class="paramname"><em>pduSize</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::shared_ptr&lt; <a class="el" href="class_entity.html">Entity</a> &gt;&#160;</td>
          <td class="paramname"><em>pduContents</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>recordRoute</em> = <code>false</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">override</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Creates an instance of exponential traffic event. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pduSize</td><td>Size of PDU to generate. </td></tr>
    <tr><td class="paramname">pduContents</td><td>Reference to <a class="el" href="class_entity.html" title="Entity class. ">Entity</a> object that will be carried by the token. </td></tr>
    <tr><td class="paramname">recordRoute</td><td>True if this generated token should record the route it follows. False otherwise. Default is false.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>PDU that was generated, per the class constructor parameters and if generator is On. Otherwise, returns nullptr. </dd></dl>

<p>Implements <a class="el" href="class_traffic_generator.html#ae439634e20e6b7844a0269d6baea7e6c">TrafficGenerator</a>.</p>

<p>Definition at line <a class="el" href="_exponential_traffic_generator_8cpp_source.html#l00207">207</a> of file <a class="el" href="_exponential_traffic_generator_8cpp_source.html">ExponentialTrafficGenerator.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00208"></a><span class="lineno">  208</span>&#160;                                                                                                             {</div>
<div class="line"><a name="l00209"></a><span class="lineno">  209</span>&#160;    <span class="comment">// Creates a PDU and assigns it class member values and a unique ID obtained from simulatorGlobals.</span></div>
<div class="line"><a name="l00210"></a><span class="lineno">  210</span>&#160;    std::shared_ptr&lt;Token&gt; token = <a class="code" href="class_traffic_generator.html#aa1943a93355f1856e639a0f163413249">TrafficGenerator::createInstanceTrafficEvent</a>(pduContents, recordRoute);</div>
<div class="line"><a name="l00211"></a><span class="lineno">  211</span>&#160;    <span class="keywordflow">if</span> (token == <span class="keyword">nullptr</span>) {</div>
<div class="line"><a name="l00212"></a><span class="lineno">  212</span>&#160;        <span class="keywordflow">return</span> <span class="keyword">nullptr</span>;</div>
<div class="line"><a name="l00213"></a><span class="lineno">  213</span>&#160;    }</div>
<div class="line"><a name="l00214"></a><span class="lineno">  214</span>&#160;    std::shared_ptr&lt;ProtocolDataUnit&gt; pdu(<span class="keyword">new</span> <a class="code" href="class_protocol_data_unit.html">ProtocolDataUnit</a>(token, pduSize));</div>
<div class="line"><a name="l00215"></a><span class="lineno">  215</span>&#160;    <span class="comment">//std::shared_ptr&lt;ProtocolDataUnit&gt; pdu(new ProtocolDataUnit(TrafficGenerator::createInstanceTrafficEvent(pduContents, recordRoute), pduSize));</span></div>
<div class="line"><a name="l00216"></a><span class="lineno">  216</span>&#160;    <span class="keywordflow">if</span> (pdu != <span class="keyword">nullptr</span>) {</div>
<div class="line"><a name="l00217"></a><span class="lineno">  217</span>&#160;        <a class="code" href="class_traffic_generator.html#a9569cd494b926b84f384c7380349d51a">scheduler</a>.<a class="code" href="class_scheduler.html#ae84f19f548d606f50fba69d00fe691b1">schedule</a>(<a class="code" href="class_event.html">Event</a>(<a class="code" href="class_exponential_traffic_generator.html#a6d33c94dd3918359ee75d51bb002e670">generateExponentialVariate</a>(), <a class="code" href="class_traffic_generator.html#a84eef27cdbfa66bbf8c14e0128196a62">eventType</a>, pdu));</div>
<div class="line"><a name="l00218"></a><span class="lineno">  218</span>&#160;    }</div>
<div class="line"><a name="l00219"></a><span class="lineno">  219</span>&#160;    <span class="keywordflow">return</span> pdu;</div>
<div class="line"><a name="l00220"></a><span class="lineno">  220</span>&#160;}</div>
<div class="ttc" id="class_protocol_data_unit_html"><div class="ttname"><a href="class_protocol_data_unit.html">ProtocolDataUnit</a></div><div class="ttdoc">Protocol Data Unit class. </div><div class="ttdef"><b>Definition:</b> <a href="_protocol_data_unit_8h_source.html#l00033">ProtocolDataUnit.h:33</a></div></div>
<div class="ttc" id="class_event_html"><div class="ttname"><a href="class_event.html">Event</a></div><div class="ttdoc">Event class. </div><div class="ttdef"><b>Definition:</b> <a href="_event_8h_source.html#l00035">Event.h:35</a></div></div>
<div class="ttc" id="class_scheduler_html_ae84f19f548d606f50fba69d00fe691b1"><div class="ttname"><a href="class_scheduler.html#ae84f19f548d606f50fba69d00fe691b1">Scheduler::schedule</a></div><div class="ttdeci">void schedule(const Event &amp;event)</div><div class="ttdef"><b>Definition:</b> <a href="_scheduler_8cpp_source.html#l00056">Scheduler.cpp:56</a></div></div>
<div class="ttc" id="class_traffic_generator_html_aa1943a93355f1856e639a0f163413249"><div class="ttname"><a href="class_traffic_generator.html#aa1943a93355f1856e639a0f163413249">TrafficGenerator::createInstanceTrafficEvent</a></div><div class="ttdeci">virtual std::shared_ptr&lt; Token &gt; createInstanceTrafficEvent(bool recordRoute=false)=0</div><div class="ttdef"><b>Definition:</b> <a href="_traffic_generator_8cpp_source.html#l00075">TrafficGenerator.cpp:75</a></div></div>
<div class="ttc" id="class_traffic_generator_html_a84eef27cdbfa66bbf8c14e0128196a62"><div class="ttname"><a href="class_traffic_generator.html#a84eef27cdbfa66bbf8c14e0128196a62">TrafficGenerator::eventType</a></div><div class="ttdeci">EventType eventType</div><div class="ttdoc">Event type that this generator will produce. </div><div class="ttdef"><b>Definition:</b> <a href="_traffic_generator_8h_source.html#l00046">TrafficGenerator.h:46</a></div></div>
<div class="ttc" id="class_traffic_generator_html_a9569cd494b926b84f384c7380349d51a"><div class="ttname"><a href="class_traffic_generator.html#a9569cd494b926b84f384c7380349d51a">TrafficGenerator::scheduler</a></div><div class="ttdeci">Scheduler &amp; scheduler</div><div class="ttdoc">Reference to Scheduler object, such that traffic generators may schedule their events. </div><div class="ttdef"><b>Definition:</b> <a href="_traffic_generator_8h_source.html#l00044">TrafficGenerator.h:44</a></div></div>
<div class="ttc" id="class_exponential_traffic_generator_html_a6d33c94dd3918359ee75d51bb002e670"><div class="ttname"><a href="class_exponential_traffic_generator.html#a6d33c94dd3918359ee75d51bb002e670">ExponentialTrafficGenerator::generateExponentialVariate</a></div><div class="ttdeci">double generateExponentialVariate()</div><div class="ttdef"><b>Definition:</b> <a href="_exponential_traffic_generator_8cpp_source.html#l00157">ExponentialTrafficGenerator.cpp:157</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a24d3daad5db81b0242a2be43b9158f4d"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::shared_ptr&lt; <a class="el" href="class_protocol_data_unit.html">ProtocolDataUnit</a> &gt; ExponentialTrafficGenerator::createInstanceTrafficEventPdu </td>
          <td>(</td>
          <td class="paramtype">unsigned int&#160;</td>
          <td class="paramname"><em>pduSize</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::vector&lt; std::shared_ptr&lt; <a class="el" href="class_entity.html">Entity</a> &gt;&gt;&#160;</td>
          <td class="paramname"><em>explicitRoute</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>recordRoute</em> = <code>false</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">override</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Creates an instance of exponential traffic event. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pduSize</td><td>Size of PDU to generate. </td></tr>
    <tr><td class="paramname">explicitRoute</td><td>Vector containing a list of <a class="el" href="class_entity.html" title="Entity class. ">Entity</a> objects representing the route to be followed by a token/PDU. </td></tr>
    <tr><td class="paramname">recordRoute</td><td>True if this generated token should record the route it follows. False otherwise. Default is false.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>PDU that was generated, per the class constructor parameters and if generator is On. Otherwise, returns nullptr. </dd></dl>

<p>Implements <a class="el" href="class_traffic_generator.html#a39ab5cd8466b7d2685442000b48070a9">TrafficGenerator</a>.</p>

<p>Definition at line <a class="el" href="_exponential_traffic_generator_8cpp_source.html#l00231">231</a> of file <a class="el" href="_exponential_traffic_generator_8cpp_source.html">ExponentialTrafficGenerator.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00232"></a><span class="lineno">  232</span>&#160;                                                                                                             {</div>
<div class="line"><a name="l00233"></a><span class="lineno">  233</span>&#160;    <span class="comment">// Creates a PDU and assigns it class member values and a unique ID obtained from simulatorGlobals.</span></div>
<div class="line"><a name="l00234"></a><span class="lineno">  234</span>&#160;    std::shared_ptr&lt;Token&gt; token = <a class="code" href="class_traffic_generator.html#aa1943a93355f1856e639a0f163413249">TrafficGenerator::createInstanceTrafficEvent</a>(explicitRoute, recordRoute);</div>
<div class="line"><a name="l00235"></a><span class="lineno">  235</span>&#160;    <span class="keywordflow">if</span> (token == <span class="keyword">nullptr</span>) {</div>
<div class="line"><a name="l00236"></a><span class="lineno">  236</span>&#160;        <span class="keywordflow">return</span> <span class="keyword">nullptr</span>;</div>
<div class="line"><a name="l00237"></a><span class="lineno">  237</span>&#160;    }</div>
<div class="line"><a name="l00238"></a><span class="lineno">  238</span>&#160;    std::shared_ptr&lt;ProtocolDataUnit&gt; pdu(<span class="keyword">new</span> <a class="code" href="class_protocol_data_unit.html">ProtocolDataUnit</a>(token, pduSize));</div>
<div class="line"><a name="l00239"></a><span class="lineno">  239</span>&#160;    <span class="comment">//std::shared_ptr&lt;ProtocolDataUnit&gt; pdu(new ProtocolDataUnit(TrafficGenerator::createInstanceTrafficEvent(explicitRoute, recordRoute), pduSize));</span></div>
<div class="line"><a name="l00240"></a><span class="lineno">  240</span>&#160;    <span class="keywordflow">if</span> (pdu != <span class="keyword">nullptr</span>) {</div>
<div class="line"><a name="l00241"></a><span class="lineno">  241</span>&#160;        <a class="code" href="class_traffic_generator.html#a9569cd494b926b84f384c7380349d51a">scheduler</a>.<a class="code" href="class_scheduler.html#ae84f19f548d606f50fba69d00fe691b1">schedule</a>(<a class="code" href="class_event.html">Event</a>(<a class="code" href="class_exponential_traffic_generator.html#a6d33c94dd3918359ee75d51bb002e670">generateExponentialVariate</a>(), <a class="code" href="class_traffic_generator.html#a84eef27cdbfa66bbf8c14e0128196a62">eventType</a>, pdu));</div>
<div class="line"><a name="l00242"></a><span class="lineno">  242</span>&#160;    }</div>
<div class="line"><a name="l00243"></a><span class="lineno">  243</span>&#160;    <span class="keywordflow">return</span> pdu;</div>
<div class="line"><a name="l00244"></a><span class="lineno">  244</span>&#160;}</div>
<div class="ttc" id="class_protocol_data_unit_html"><div class="ttname"><a href="class_protocol_data_unit.html">ProtocolDataUnit</a></div><div class="ttdoc">Protocol Data Unit class. </div><div class="ttdef"><b>Definition:</b> <a href="_protocol_data_unit_8h_source.html#l00033">ProtocolDataUnit.h:33</a></div></div>
<div class="ttc" id="class_event_html"><div class="ttname"><a href="class_event.html">Event</a></div><div class="ttdoc">Event class. </div><div class="ttdef"><b>Definition:</b> <a href="_event_8h_source.html#l00035">Event.h:35</a></div></div>
<div class="ttc" id="class_scheduler_html_ae84f19f548d606f50fba69d00fe691b1"><div class="ttname"><a href="class_scheduler.html#ae84f19f548d606f50fba69d00fe691b1">Scheduler::schedule</a></div><div class="ttdeci">void schedule(const Event &amp;event)</div><div class="ttdef"><b>Definition:</b> <a href="_scheduler_8cpp_source.html#l00056">Scheduler.cpp:56</a></div></div>
<div class="ttc" id="class_traffic_generator_html_aa1943a93355f1856e639a0f163413249"><div class="ttname"><a href="class_traffic_generator.html#aa1943a93355f1856e639a0f163413249">TrafficGenerator::createInstanceTrafficEvent</a></div><div class="ttdeci">virtual std::shared_ptr&lt; Token &gt; createInstanceTrafficEvent(bool recordRoute=false)=0</div><div class="ttdef"><b>Definition:</b> <a href="_traffic_generator_8cpp_source.html#l00075">TrafficGenerator.cpp:75</a></div></div>
<div class="ttc" id="class_traffic_generator_html_a84eef27cdbfa66bbf8c14e0128196a62"><div class="ttname"><a href="class_traffic_generator.html#a84eef27cdbfa66bbf8c14e0128196a62">TrafficGenerator::eventType</a></div><div class="ttdeci">EventType eventType</div><div class="ttdoc">Event type that this generator will produce. </div><div class="ttdef"><b>Definition:</b> <a href="_traffic_generator_8h_source.html#l00046">TrafficGenerator.h:46</a></div></div>
<div class="ttc" id="class_traffic_generator_html_a9569cd494b926b84f384c7380349d51a"><div class="ttname"><a href="class_traffic_generator.html#a9569cd494b926b84f384c7380349d51a">TrafficGenerator::scheduler</a></div><div class="ttdeci">Scheduler &amp; scheduler</div><div class="ttdoc">Reference to Scheduler object, such that traffic generators may schedule their events. </div><div class="ttdef"><b>Definition:</b> <a href="_traffic_generator_8h_source.html#l00044">TrafficGenerator.h:44</a></div></div>
<div class="ttc" id="class_exponential_traffic_generator_html_a6d33c94dd3918359ee75d51bb002e670"><div class="ttname"><a href="class_exponential_traffic_generator.html#a6d33c94dd3918359ee75d51bb002e670">ExponentialTrafficGenerator::generateExponentialVariate</a></div><div class="ttdeci">double generateExponentialVariate()</div><div class="ttdef"><b>Definition:</b> <a href="_exponential_traffic_generator_8cpp_source.html#l00157">ExponentialTrafficGenerator.cpp:157</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a8fd1c69c9243af8bf41df11c7475fb20"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::shared_ptr&lt; <a class="el" href="class_protocol_data_unit.html">ProtocolDataUnit</a> &gt; ExponentialTrafficGenerator::createInstanceTrafficEventPdu </td>
          <td>(</td>
          <td class="paramtype">unsigned int&#160;</td>
          <td class="paramname"><em>pduSize</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::shared_ptr&lt; <a class="el" href="class_entity.html">Entity</a> &gt;&#160;</td>
          <td class="paramname"><em>tokenContents</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::vector&lt; std::shared_ptr&lt; <a class="el" href="class_entity.html">Entity</a> &gt;&gt;&#160;</td>
          <td class="paramname"><em>explicitRoute</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>recordRoute</em> = <code>false</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">override</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Creates an instance of exponential traffic event. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pduSize</td><td>Size of PDU to generate. </td></tr>
    <tr><td class="paramname">tokenContents</td><td>Reference to <a class="el" href="class_entity.html" title="Entity class. ">Entity</a> object that will be carried by the token. </td></tr>
    <tr><td class="paramname">explicitRoute</td><td>Vector containing a list of <a class="el" href="class_entity.html" title="Entity class. ">Entity</a> objects representing the route to be followed by a token/PDU. </td></tr>
    <tr><td class="paramname">recordRoute</td><td>True if this generated token should record the route it follows. False otherwise. Default is false.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>PDU that was generated, per the class constructor parameters and if generator is On. Otherwise, returns nullptr. </dd></dl>

<p>Implements <a class="el" href="class_traffic_generator.html#a058d0a28ed8206bc5b8295498673fefe">TrafficGenerator</a>.</p>

<p>Definition at line <a class="el" href="_exponential_traffic_generator_8cpp_source.html#l00256">256</a> of file <a class="el" href="_exponential_traffic_generator_8cpp_source.html">ExponentialTrafficGenerator.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00258"></a><span class="lineno">  258</span>&#160;                                                                                                             {</div>
<div class="line"><a name="l00259"></a><span class="lineno">  259</span>&#160;    <span class="comment">// Creates a PDU and assigns it class member values and a unique ID obtained from simulatorGlobals.</span></div>
<div class="line"><a name="l00260"></a><span class="lineno">  260</span>&#160;    std::shared_ptr&lt;Token&gt; token = <a class="code" href="class_traffic_generator.html#aa1943a93355f1856e639a0f163413249">TrafficGenerator::createInstanceTrafficEvent</a>(<a class="code" href="class_traffic_generator.html#acb5d8009cf49ff99a6fee75ec456e166">tokenContents</a>, explicitRoute, recordRoute);</div>
<div class="line"><a name="l00261"></a><span class="lineno">  261</span>&#160;    <span class="keywordflow">if</span> (token == <span class="keyword">nullptr</span>) {</div>
<div class="line"><a name="l00262"></a><span class="lineno">  262</span>&#160;        <span class="keywordflow">return</span> <span class="keyword">nullptr</span>;</div>
<div class="line"><a name="l00263"></a><span class="lineno">  263</span>&#160;    }</div>
<div class="line"><a name="l00264"></a><span class="lineno">  264</span>&#160;    std::shared_ptr&lt;ProtocolDataUnit&gt; pdu(<span class="keyword">new</span> <a class="code" href="class_protocol_data_unit.html">ProtocolDataUnit</a>(token, pduSize));</div>
<div class="line"><a name="l00265"></a><span class="lineno">  265</span>&#160;    <span class="comment">//std::shared_ptr&lt;ProtocolDataUnit&gt; pdu(new ProtocolDataUnit(TrafficGenerator::createInstanceTrafficEvent(tokenContents, explicitRoute, recordRoute), pduSize));</span></div>
<div class="line"><a name="l00266"></a><span class="lineno">  266</span>&#160;    <span class="keywordflow">if</span> (pdu != <span class="keyword">nullptr</span>) {</div>
<div class="line"><a name="l00267"></a><span class="lineno">  267</span>&#160;        <a class="code" href="class_traffic_generator.html#a9569cd494b926b84f384c7380349d51a">scheduler</a>.<a class="code" href="class_scheduler.html#ae84f19f548d606f50fba69d00fe691b1">schedule</a>(<a class="code" href="class_event.html">Event</a>(<a class="code" href="class_exponential_traffic_generator.html#a6d33c94dd3918359ee75d51bb002e670">generateExponentialVariate</a>(), <a class="code" href="class_traffic_generator.html#a84eef27cdbfa66bbf8c14e0128196a62">eventType</a>, pdu));</div>
<div class="line"><a name="l00268"></a><span class="lineno">  268</span>&#160;    }</div>
<div class="line"><a name="l00269"></a><span class="lineno">  269</span>&#160;    <span class="keywordflow">return</span> pdu;</div>
<div class="line"><a name="l00270"></a><span class="lineno">  270</span>&#160;}<div class="ttc" id="class_protocol_data_unit_html"><div class="ttname"><a href="class_protocol_data_unit.html">ProtocolDataUnit</a></div><div class="ttdoc">Protocol Data Unit class. </div><div class="ttdef"><b>Definition:</b> <a href="_protocol_data_unit_8h_source.html#l00033">ProtocolDataUnit.h:33</a></div></div>
<div class="ttc" id="class_event_html"><div class="ttname"><a href="class_event.html">Event</a></div><div class="ttdoc">Event class. </div><div class="ttdef"><b>Definition:</b> <a href="_event_8h_source.html#l00035">Event.h:35</a></div></div>
<div class="ttc" id="class_scheduler_html_ae84f19f548d606f50fba69d00fe691b1"><div class="ttname"><a href="class_scheduler.html#ae84f19f548d606f50fba69d00fe691b1">Scheduler::schedule</a></div><div class="ttdeci">void schedule(const Event &amp;event)</div><div class="ttdef"><b>Definition:</b> <a href="_scheduler_8cpp_source.html#l00056">Scheduler.cpp:56</a></div></div>
<div class="ttc" id="class_traffic_generator_html_aa1943a93355f1856e639a0f163413249"><div class="ttname"><a href="class_traffic_generator.html#aa1943a93355f1856e639a0f163413249">TrafficGenerator::createInstanceTrafficEvent</a></div><div class="ttdeci">virtual std::shared_ptr&lt; Token &gt; createInstanceTrafficEvent(bool recordRoute=false)=0</div><div class="ttdef"><b>Definition:</b> <a href="_traffic_generator_8cpp_source.html#l00075">TrafficGenerator.cpp:75</a></div></div>
<div class="ttc" id="class_traffic_generator_html_a84eef27cdbfa66bbf8c14e0128196a62"><div class="ttname"><a href="class_traffic_generator.html#a84eef27cdbfa66bbf8c14e0128196a62">TrafficGenerator::eventType</a></div><div class="ttdeci">EventType eventType</div><div class="ttdoc">Event type that this generator will produce. </div><div class="ttdef"><b>Definition:</b> <a href="_traffic_generator_8h_source.html#l00046">TrafficGenerator.h:46</a></div></div>
<div class="ttc" id="class_traffic_generator_html_acb5d8009cf49ff99a6fee75ec456e166"><div class="ttname"><a href="class_traffic_generator.html#acb5d8009cf49ff99a6fee75ec456e166">TrafficGenerator::tokenContents</a></div><div class="ttdeci">std::shared_ptr&lt; Entity &gt; tokenContents</div><div class="ttdoc">Reference to Entity object that will be carried by the token. </div><div class="ttdef"><b>Definition:</b> <a href="_traffic_generator_8h_source.html#l00047">TrafficGenerator.h:47</a></div></div>
<div class="ttc" id="class_traffic_generator_html_a9569cd494b926b84f384c7380349d51a"><div class="ttname"><a href="class_traffic_generator.html#a9569cd494b926b84f384c7380349d51a">TrafficGenerator::scheduler</a></div><div class="ttdeci">Scheduler &amp; scheduler</div><div class="ttdoc">Reference to Scheduler object, such that traffic generators may schedule their events. </div><div class="ttdef"><b>Definition:</b> <a href="_traffic_generator_8h_source.html#l00044">TrafficGenerator.h:44</a></div></div>
<div class="ttc" id="class_exponential_traffic_generator_html_a6d33c94dd3918359ee75d51bb002e670"><div class="ttname"><a href="class_exponential_traffic_generator.html#a6d33c94dd3918359ee75d51bb002e670">ExponentialTrafficGenerator::generateExponentialVariate</a></div><div class="ttdeci">double generateExponentialVariate()</div><div class="ttdef"><b>Definition:</b> <a href="_exponential_traffic_generator_8cpp_source.html#l00157">ExponentialTrafficGenerator.cpp:157</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a6d33c94dd3918359ee75d51bb002e670"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">double ExponentialTrafficGenerator::generateExponentialVariate </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Generate an exponential distribution variate based on member variable tau.</p>
<p>The exponential variate is generated using C++11 Random library and uses the random number generator obtained from <a class="el" href="class_simulator_globals.html" title="Simulator-scope variables and parameters. ">SimulatorGlobals</a>, such that its global seed can be utilized.</p>
<dl class="section return"><dt>Returns</dt><dd>Exponential distribution variate based on member variable tau. </dd></dl>

<p>Definition at line <a class="el" href="_exponential_traffic_generator_8cpp_source.html#l00157">157</a> of file <a class="el" href="_exponential_traffic_generator_8cpp_source.html">ExponentialTrafficGenerator.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00157"></a><span class="lineno">  157</span>&#160;                                                               {</div>
<div class="line"><a name="l00158"></a><span class="lineno">  158</span>&#160;    <span class="comment">// Have not seen different behavior with or without static below, per unit testing.</span></div>
<div class="line"><a name="l00159"></a><span class="lineno">  159</span>&#160;    <span class="comment">// The pseudorandom sequence seems to be unique per simulation, not per generator; the former is the expected behavior.</span></div>
<div class="line"><a name="l00160"></a><span class="lineno">  160</span>&#160;    <span class="comment">//static std::exponential_distribution&lt;double&gt; exponentialGenerator(tau);</span></div>
<div class="line"><a name="l00161"></a><span class="lineno">  161</span>&#160;    std::exponential_distribution&lt;double&gt; exponentialGenerator(1/<a class="code" href="class_exponential_traffic_generator.html#ac4d67b1f01cd5d96e83e2b7c6d4ad841">tau</a>); <span class="comment">// !!! Notice that the exponential generator takes lambda (from Poisson), not tau!!!</span></div>
<div class="line"><a name="l00162"></a><span class="lineno">  162</span>&#160;    <span class="keywordflow">return</span> exponentialGenerator(<a class="code" href="class_traffic_generator.html#a42261ccf207f61a401473a106bc0bae3">simulatorGlobals</a>.<a class="code" href="class_simulator_globals.html#a4249f51c03094b902a91514aae13fb92">getRandomNumberGeneratorEngineInstance</a>());</div>
<div class="line"><a name="l00163"></a><span class="lineno">  163</span>&#160;}</div>
<div class="ttc" id="class_simulator_globals_html_a4249f51c03094b902a91514aae13fb92"><div class="ttname"><a href="class_simulator_globals.html#a4249f51c03094b902a91514aae13fb92">SimulatorGlobals::getRandomNumberGeneratorEngineInstance</a></div><div class="ttdeci">std::default_random_engine &amp; getRandomNumberGeneratorEngineInstance()</div><div class="ttdef"><b>Definition:</b> <a href="_simulator_globals_8cpp_source.html#l00082">SimulatorGlobals.cpp:82</a></div></div>
<div class="ttc" id="class_exponential_traffic_generator_html_ac4d67b1f01cd5d96e83e2b7c6d4ad841"><div class="ttname"><a href="class_exponential_traffic_generator.html#ac4d67b1f01cd5d96e83e2b7c6d4ad841">ExponentialTrafficGenerator::tau</a></div><div class="ttdeci">double tau</div><div class="ttdoc">Mean interarrival time for exponential probability distribution. </div><div class="ttdef"><b>Definition:</b> <a href="_exponential_traffic_generator_8h_source.html#l00041">ExponentialTrafficGenerator.h:41</a></div></div>
<div class="ttc" id="class_traffic_generator_html_a42261ccf207f61a401473a106bc0bae3"><div class="ttname"><a href="class_traffic_generator.html#a42261ccf207f61a401473a106bc0bae3">TrafficGenerator::simulatorGlobals</a></div><div class="ttdeci">SimulatorGlobals &amp; simulatorGlobals</div><div class="ttdoc">Reference to SimulatorGlobals object, to get random generator info. </div><div class="ttdef"><b>Definition:</b> <a href="_traffic_generator_8h_source.html#l00045">TrafficGenerator.h:45</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="ab3e55f82f8d2539ca6adaa190177d313"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">double ExponentialTrafficGenerator::getTau </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Returns tau (interarrival time).</p>
<dl class="section return"><dt>Returns</dt><dd>Tau. </dd></dl>

<p>Definition at line <a class="el" href="_exponential_traffic_generator_8cpp_source.html#l00170">170</a> of file <a class="el" href="_exponential_traffic_generator_8cpp_source.html">ExponentialTrafficGenerator.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00170"></a><span class="lineno">  170</span>&#160;                                                 {</div>
<div class="line"><a name="l00171"></a><span class="lineno">  171</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="class_exponential_traffic_generator.html#ac4d67b1f01cd5d96e83e2b7c6d4ad841">tau</a>;</div>
<div class="line"><a name="l00172"></a><span class="lineno">  172</span>&#160;}</div>
<div class="ttc" id="class_exponential_traffic_generator_html_ac4d67b1f01cd5d96e83e2b7c6d4ad841"><div class="ttname"><a href="class_exponential_traffic_generator.html#ac4d67b1f01cd5d96e83e2b7c6d4ad841">ExponentialTrafficGenerator::tau</a></div><div class="ttdeci">double tau</div><div class="ttdoc">Mean interarrival time for exponential probability distribution. </div><div class="ttdef"><b>Definition:</b> <a href="_exponential_traffic_generator_8h_source.html#l00041">ExponentialTrafficGenerator.h:41</a></div></div>
</div><!-- fragment -->
</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a class="anchor" id="ac4d67b1f01cd5d96e83e2b7c6d4ad841"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">double ExponentialTrafficGenerator::tau</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Mean interarrival time for exponential probability distribution. </p>

<p>Definition at line <a class="el" href="_exponential_traffic_generator_8h_source.html#l00041">41</a> of file <a class="el" href="_exponential_traffic_generator_8h_source.html">ExponentialTrafficGenerator.h</a>.</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>QcnSim/<a class="el" href="_exponential_traffic_generator_8h_source.html">ExponentialTrafficGenerator.h</a></li>
<li>QcnSim/<a class="el" href="_exponential_traffic_generator_8cpp_source.html">ExponentialTrafficGenerator.cpp</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Mon Jan 6 2014 12:30:42 for QCNSim by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.5
</small></address>
</body>
</html>
